1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-17 22:23:10 +03:00

Adding new SoftwareSerial (NewSoftSerial by Mikal Hart).

This commit is contained in:
David A. Mellis
2011-01-09 12:45:46 -05:00
parent e816ffb0b6
commit 80bb16db8c
6 changed files with 816 additions and 0 deletions

View File

@ -0,0 +1,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.print((char)mySerial.read());
if (Serial.available())
mySerial.print((char)Serial.read());
}