apuntes_Arduino/TEST/OK_ESP01/OK_ESP01.ino

24 lines
417 B
Arduino
Raw Normal View History

2021-01-05 00:15:16 -03:00
//RX is digital pin 2 (connect to TX of other device)
//TX is digital pin 3 (connect to RX of other device)
#include <SoftwareSerial.h>
const int baudRate = 115200;
SoftwareSerial miESP(2, 3); // RX, TX
void setup() {
Serial.begin(115200);
miESP.begin(115200);
}
void loop() {
if (miESP.available()) {
Serial.write(miESP.read());
}
if (Serial.available()) {
miESP.write(Serial.read());
}
}