IAT 267 Lecture Notes - Serial Communication, Baud, Readwrite
Document Summary
Library-a collection of procedures, where all the procedures are related. The library used is the serial library which allows the arduino to send data back to the computer. Sets the data rate in bits per second (baud) for serial data transmission. For communicating with the computer, use one of these rates: 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200 void setup() Returns an int, the first byte of incoming serial data available (or -1 if no data available) Can send data from arduino to computer with serial. print() // opens serial port, sets data rate to 9600 bps. Receiving program on the computer can be in any language that knows about serial ports. C/c++, perl, php, java, max/msp, python, visual basic, processing, etc. Type in a number 1-9 and led blinks that number. Converts number typed into usable number char val = val 0": converts from char to number.