Hardware Reference
In-Depth Information
Figure 6-7.
Output of ADC program
UART
Accessing UART with the arduPi library is as simple as doing it with Arduino. You need
to include
arduPi.h
in your code and create an instance of the
SerialPi
class, naming
it
Serial
. Naming the instance as
Serial
allows you to use the Arduino syntax.
These steps are already done for you if you use the template to create your pro-
grams.
These are the available functions:
•
Serial.available()
•
Serial.begin()
•
Serial.end()
•
Serial.flush()
•
Serial.peek()
•
Serial.print()
•
Serial.println()
•
Serial.read()
•
Serial.readBytes()
•
Serial.readBytesUntil()