Basic Arduino Serial Communication
Basic Arduino Serial Communication
On Uno, Nano, Mini, and Mega, pins 0 and 1 are used for communication with the computer. Connecting anything to
these pins can interfere with that communication, including causing failed uploads to the board.
Serial communication on pins TX/RX uses TTL logic levels (5V or 3.3V depending on the board). Don’t connect these
pins directly to an RS232 serial port; they operate at +/- 12V and can damage your Arduino board.
Functions: begin()
Syntax
Serial.begin(speed)
Serial.begin(speed, config)
Sets the data rate in bits per second (baud) for serial data transmission. For communicating with Serial Monitor, make sure to use one of the baud rates listed in the
menu at the bottom right corner of its screen. You can, however, specify other rates - for example, to communicate over pins 0 and 1 with a component that
requires a particular baud rate