PiDuino Library

Serial.begin(speed)

Opens a serial port at the specified speed (baud rate).

Parameters

speed - Serial port baud rate. (See Notes)

Returns

None


Example

#include <Arduino.h>

void setup() {
	Serial.begin(9600);
}

void loop() {
        Serial.println("Hello World");
	delay(1000);
}

Notes

Baud rates
50
75
110
134
150
200
300
600
1200
1800
2400
9600
19200
38400
57600
115200
230400
460800
500000
576000
921600
1000000
1152000
1500000
2000000
2500000
3000000
3500000
4000000
#include <Arduino.h>

void setup() {
        strcpy(SERIAL_DRIVER_NAME, "/dev/ttyAMA1");
        Serial.begin(9600);
}

void loop() {
        Serial.println("Hello World");
        delay(1000);
}