mirror of
https://github.com/esp8266/Arduino.git
synced 2025-09-16 16:42:33 +03:00
app
build
core
hardware
libraries
EEPROM
Ethernet
Firmata
LiquidCrystal
SD
SPI
Servo
SoftwareSerial
examples
SoftwareSerialExample
SoftwareSerialExample.ino
TwoPortReceive
SoftwareSerial.cpp
SoftwareSerial.h
keywords.txt
Stepper
Wire
.classpath
.project
license.txt
readme.txt
todo.txt
This reverts commitdf9835efaf
, reversing changes made toec45af8bfa
. Conflicts: hardware/arduino/variants/mega/pins_arduino.h libraries/Ethernet/examples/PachubeClientString/PachubeClientString.ino
22 lines
415 B
C++
22 lines
415 B
C++
#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());
|
|
}
|