Hardware Reference
In-Depth Information
Serial.begin
Opens the serial port on the Galileo and tells it what speed to send the data.
See “Serial.begin()” on page 53 .
Syntax
Serial.begin(speed);
Parameters
speed
The speed in bits per second (also known as baud). The following stan-
dard Arduino speeds can be used: 300, 600, 1200, 2400, 4800, 9600,
14400, 19200, 28800, 38400, 57600, or 115200. With Arduino sketches,
9600 is most common. Intel Galileo also supports speeds of 50, 75, 110,
134, 150, 200, 1800, 230400, 460800, and 500000.
Return value
None.
Example
Serial.begin(9600);
Opens the serial port and sets the speed to 9600 bits per second.
Serial.print
Transmits data over the serial port. See “Serial.print()” on page 54 .
Syntax
Serial.print(value);
Parameters
value
The data to send. This can be a string of text, a character, a byte, an
integer, or other types of data.
Return Value
long
The number of bytes transmitted.
Example
Serial.print("Hello, world!");
Search WWH ::




Custom Search