-
-
Save sabas1080/3949e403ab3597036f9a28c97c879c72 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
#include <TheThingsNetwork.h> | |
#include <SoftwareSerial.h> | |
#define RESET 15 | |
//SoftwareSerial loraSerial(4, 5); // RX, TX !! labels on relay board is swapped !! | |
#define loraSerial Serial1 | |
#define debugSerial Serial | |
// Replace REPLACE_ME with TTN_FP_EU868 or TTN_FP_US915 | |
#define freqPlan TTN_FP_US915 | |
TheThingsNetwork ttn(loraSerial, debugSerial, freqPlan); | |
void setup() | |
{ | |
loraSerial.begin(57600); | |
debugSerial.begin(9600); | |
pinMode(RESET,OUTPUT); | |
digitalWrite(RESET, HIGH); | |
} | |
void loop() | |
{ | |
debugSerial.println("Device Information"); | |
debugSerial.println(); | |
ttn.showStatus(); | |
debugSerial.println(); | |
debugSerial.println("Use the EUI to register the device for OTAA"); | |
debugSerial.println("-------------------------------------------"); | |
debugSerial.println(); | |
delay(10000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment