Skip to content

Instantly share code, notes, and snippets.

@ArduinoDiscordBot
Created August 18, 2019 21:49
Show Gist options
  • Save ArduinoDiscordBot/cc12908a3aeb57dc49392f26a65f0659 to your computer and use it in GitHub Desktop.
Save ArduinoDiscordBot/cc12908a3aeb57dc49392f26a65f0659 to your computer and use it in GitHub Desktop.
Code by AllStorm#4557 - Sun Aug 18 2019 21:49:28 GMT+0000 (Coordinated Universal Time)
#include <Adafruit_FONA.h>
#include <SoftwareSerial.h>
SoftwareSerial SIM5320(10,11);
void setup() {
Serial.begin(4800);
SIM5320.begin(4800);
}
void loop() {
while (SIM5320.available()){
Serial.write(SIM5320.read());
}
while (Serial.available()){
SIM5320.write(Serial.read());
}
}
-------And this is the code i've changed---------
#include <Adafruit_FONA.h>
#include <SoftwareSerial.h>
SoftwareSerial SIM5320(10,11);
void setup() {
Serial.begin(4800);
SIM5320.begin(4800);
}
void loop() {
while (SIM5320.available()){
byte b = Serial.read();
if ( b == '' )
Serial.write( 0x1a );
else
Serial.write(SIM5320.read());
}
while (Serial.available()){
byte b = Serial.read();
if ( b == '' )
SIM5320.write( 0x1a );
else
SIM5320.write(Serial.read());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment