Download Arduino Programming Guide on pcDuino
Transcript
Doc Title Arduino Programming Guide on pcDuino Version 0.1 3. Arduino library and samples 3.1 UART Reference: Please refer to the Serial class from Arduino (http://arduino.cc/en/Reference/Serial). F u n c t i o ns if (Serial) available() begin() end() find() findUntil() flush() parseFloat() parseInt() peek() print() println() read() readBytes() readBytesUntil() setTimeout() write() serialEvent() UART Rx and Tx pins are shared with GPIO 0 and 1. Thus, if you are using UART, please don’t call pinMode to change function mode of GPIO 0 and 1. Currently, the supported baud rates are: 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600 and 115200 Hz. Sample Accept the typing from the terminal, then print out the input in the second line. Both read and write operations are via UART interfaces. Setup Plugin USB-to-serial cable to PC USB port and install usb_to_serial driver to PC Page 7 of 20