EasyManuals Logo

Arduino Pro Mini User Manual

Arduino Pro Mini
311 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #266 background imageLoading...
Page #266 background image
APPENDIX 3
Advanced Serial Programming
In nearly all of the books projects, weve used the Arduinos serial port.
Sometimes we only emitted debug messages to monitor the current state of
our sketches, but often we needed it to actually output information or to send
commands. And the fact is, weve used the
Serial
class without explaining how
serial communication actually works. Well catch up on that in this appendix.
To communicate with an Arduino, we mainly used JavaScript, and in some
cases we used Processing. But many developers prefer other languages, and
in this appendix, youll also learn how to use C/C++, Java, Ruby, Python,
and Perl to talk to an Arduino.
Learning More About Serial Communication
In Chapter 2, Creating Bigger Projects with the Arduino, on page 23, you saw
that you need only three wires for serial communication: a common ground,
a line for transmitting data (TX), and one for receiving data (RX). (See the
diagram on page 28.)
Data is transmitted as electrical pulses, so both communication partners
need a reference for the voltage level, and thats what the common ground is
for. The transmission line is used to send data to the recipient and has to be
connected to the recipients receiving line. This enables full-duplex communi-
cation where both partners can send and receive data simultaneously.
(Wouldnt it be great if people could also communicate full-duplex?)
We now know how to connect two devices, but we still have to transmit some
data. Therefore, both communication partners have to agree on a protocol,
and on page 254, you can see what a typical serial communication looks like.
The different states of a bit are represented by different voltage levels. Usually,
report erratum discuss
www.it-ebooks.info

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Arduino Pro Mini and is the answer not in the manual?

Arduino Pro Mini Specifications

General IconGeneral
BrandArduino
ModelPro Mini
CategoryMotherboard
LanguageEnglish

Related product manuals