Skip to content

Instantly share code, notes, and snippets.

@masto
Created February 25, 2023 03:58
Show Gist options
  • Save masto/c60b007f8256be1f9e3b11fb1894cfd1 to your computer and use it in GitHub Desktop.
Save masto/c60b007f8256be1f9e3b11fb1894cfd1 to your computer and use it in GitHub Desktop.
// 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