24 lines
417 B
C++
Executable File
24 lines
417 B
C++
Executable File
//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());
|
|
}
|
|
}
|
|
|
|
|