blob: 1f535bdef35b710328b5a5fec4d5077b3df6344a (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 | #include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3);
void setup()  
{
  Serial.begin(57600);
  Serial.println("Goodnight moon!");
  // set the data rate for the SoftwareSerial port
  mySerial.begin(4800);
  mySerial.println("Hello, world?");
}
void loop() // run over and over
{
  if (mySerial.available())
    Serial.write(mySerial.read());
  if (Serial.available())
    mySerial.write(Serial.read());
}
 |