Skip to content

Instantly share code, notes, and snippets.

@rmeister
Created June 17, 2016 10:23
Show Gist options
  • Save rmeister/83fe8b1bf60a4f9fd0147f36c89fbd0c to your computer and use it in GitHub Desktop.
Save rmeister/83fe8b1bf60a4f9fd0147f36c89fbd0c to your computer and use it in GitHub Desktop.
#include <SoftModem.h>
SoftModem modem = SoftModem();
void setup() {
Serial.begin(115200);
Serial.println("Booting");
delay(100);
modem.begin();
}
void loop() {
while(modem.available()){
int c = modem.read();
if(isprint(c)){
Serial.print((char)c);
}
else{
Serial.print("(");
Serial.print(c,HEX);
Serial.println(")");
}
}
if(Serial.available()){
modem.write(0xff);
while(Serial.available()){
char c = Serial.read();
modem.write(c);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment