Show minor edits - Show changes to markup
Sets the speed (baud rate) for the serial communication. Supported baud rates are 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 31250, 38400, 57600, and 115200.
Sets the speed (baud rate) for the serial communication. Supported baud rates are 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 31250, 38400, 57600, and 115200.
[@// include the SoftwareSerial library so you can use its functions:
(:source lang=arduino tabwidth=4:) // include the SoftwareSerial library so you can use its functions:
@]
(:sourceend:)
Sets the speed (baud rate) for the serial communication. Using speeds higher than 9600 baud will result in faulty communication.
Sets the speed (baud rate) for the serial communication. Supported baud rates are 300, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 31250, 38400, 57600, and 115200.
SoftwareSerial
SoftwareSerial
byte pinState = 0;
// define pin modes for tx, rx, led pins:
// define pin modes for tx, rx:
pinMode(ledPin, OUTPUT);
}@]
}
void loop() {
// ...
} @]
SoftwareSerial serial(6, 7);
void setup()
{
serial.begin(9600);
}
// include the SoftwareSerial library so you can use its functions:
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
#define ledPin 13
// set up a new serial port
SoftwareSerial mySerial = SoftwareSerial(rxPin, txPin);
byte pinState = 0;
void setup() {
// define pin modes for tx, rx, led pins:
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
pinMode(ledPin, OUTPUT);
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
}
Sets the speed (baud rate) for the serial communication. Using speeds higher than 9600 baud will result in faulty communication.
speed: the baud rate (long)
none
SoftwareSerial serial(6, 7);
void setup()
{
serial.begin(9600);
}