Basic RX/TX example, this is the firmware that LoDev S76S comes with initially.
Dependencies: mbed SX1276RonothLib
LoDev RX/TX Example
Transmit
By default LoDev comes on in receive mode. To switch to transmit mode, connect PC2 to 3.3v and press the reset switch. In TX mode the blue LED is normally off and blinks on briefly when transmitting.
Receive
When in RX mode the LED is normally on and turns off briefly when receiving a packet. This is the default mode.
Revision 2:a93ffb29a2d2, committed 2019-07-15
- Comitter:
- steve918
- Date:
- Mon Jul 15 22:05:34 2019 +0000
- Parent:
- 1:5a35e7dd2cb2
- Child:
- 3:80e4a46e676c
- Commit message:
- Readme file
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.md Mon Jul 15 22:05:34 2019 +0000 @@ -0,0 +1,9 @@ +RX/TX Example +============= + +This is a barebones example that allows a device to transmit or recieve packets +using LoRa modulation. + +By default the device is in RX mode. ***To enable TX mode connect PC2 to 3v3** + and reset the device via reset button. +
--- a/config.h Tue Jul 09 01:53:14 2019 +0000 +++ b/config.h Mon Jul 15 22:05:34 2019 +0000 @@ -1,6 +1,6 @@ // LoRa configuration settings -#define RF_FREQUENCY 915010000 // Hz +#define RF_FREQUENCY 868000000 // Hz #define TX_OUTPUT_POWER 14 // 14 dBm #define LORA_BANDWIDTH 125000 // LoRa default, details in SX1276::BandwidthMap #define LORA_SPREADING_FACTOR LORA_SF7
--- a/main.cpp Tue Jul 09 01:53:14 2019 +0000 +++ b/main.cpp Mon Jul 15 22:05:34 2019 +0000 @@ -17,7 +17,7 @@ // NOTE: By default the sample application is in recieve mode. // Connect PIN PC_2 to 3.3v to transmit -DigitalIn txModeIndicator = DigitalIn(TX_IND); +DigitalIn txModeIndicator = DigitalIn(TX_IND, PullDown); int timeoutCount, errCount, recvCount = 0;