Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define ESPSerial Serial1
- void setup() {
- // wait for hardware serial to appear
- while (!Serial);
- // make this baud rate for the MCU
- Serial.begin(115200);
- // 9600 baud rate for the EPS
- ESPSerial.begin(9600);
- }
- void loop() {
- if (Serial.available()) {
- char c = Serial.read();
- ESPSerial.write(c);
- }
- if (ESPSSerial.available()) {
- char c = ESPSerial.read();
- Serial.write(c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement