Home Page | Language Reference (extended) | SD Reference | Libraries | Comparison | Changes
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. You can, however, specify other rates - for example, to communicate over pins 0 and 1 with a component that requires a particular baud rate.
Serial.begin(speed)
Arduino Mega only:
Serial1.begin(speed)
Serial2.begin(speed)
Serial3.begin(speed)
speed: in bits per second (baud) - long
nothing
Arduino Mega example:
// Arduino Mega using all four of its Serial ports
Arduino Mega example:
Thanks to Jeff Gray for the mega example
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.