Created
February 25, 2023 03:58
-
-
Save masto/c60b007f8256be1f9e3b11fb1894cfd1 to your computer and use it in GitHub Desktop.
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
// Trivial program that sends the single byte to tickle a NABU Internet Adapter awake | |
// and then dumps out any response. | |
#include <SoftwareSerial.h> | |
SoftwareSerial mySerial(10, 11); // RX, TX | |
void setup() { | |
Serial.begin(115200); | |
Serial.println("Started"); | |
mySerial.begin(111861); | |
mySerial.write(0x83); | |
Serial.println("Sent 83h"); | |
} | |
void loop() { | |
if (mySerial.available()) { | |
Serial.print("Got ["); | |
Serial.print(mySerial.read(), HEX); | |
Serial.println("h]"); | |
} | |
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