Skip to content

Instantly share code, notes, and snippets.

@yeffrimic
Created June 22, 2016 04:02
Show Gist options
  • Save yeffrimic/c721fb90ec5546955585050791258fb2 to your computer and use it in GitHub Desktop.
Save yeffrimic/c721fb90ec5546955585050791258fb2 to your computer and use it in GitHub Desktop.
// this sketch is used for testing LoNet with Arduino
// Connect VIO to +5V
// Connect GND to Ground
// Connect RX (data into SIM808) to Digital 11
// Connect TX (data out from SIM808) to Digital 10
#include <SoftwareSerial.h>
SoftwareSerial mySerial(2, 3); // RX, TX
void setup()
{
// Open serial communications and wait for port to open:
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() // run over and over
{
if (mySerial.available())
Serial.write(mySerial.read());
if (Serial.available())
{
while(Serial.available())
{
mySerial.write(Serial.read());
}
mySerial.println();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment