Created
June 10, 2019 02:20
-
-
Save HectorTorres/edae05dd105bc327a13c13d343dc14a3 to your computer and use it in GitHub Desktop.
Eco de Arduino
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(10, 11); // RX, TX | |
void setup() { | |
// Open serial communications and wait for port to open: | |
Serial.begin(115200); | |
while (!Serial) { | |
; // wait for serial port to connect. Needed for native USB port only | |
} | |
Serial.println("Goodnight moon!"); | |
// set the data rate for the SoftwareSerial port | |
mySerial.begin(115200); | |
mySerial.println("Hello, world?"); | |
} | |
void loop() { // run over and over | |
if (mySerial.available()) { | |
Serial.write(mySerial.read()); | |
} | |
if (Serial.available()) { | |
mySerial.write(Serial.read()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment