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.
config.h@3:80e4a46e676c, 2019-07-15 (annotated)
- Committer:
- steve918
- Date:
- Mon Jul 15 22:07:41 2019 +0000
- Revision:
- 3:80e4a46e676c
- Parent:
- 2:a93ffb29a2d2
update readme;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
steve918 | 0:5acc19265529 | 1 | // LoRa configuration settings |
steve918 | 0:5acc19265529 | 2 | |
steve918 | 2:a93ffb29a2d2 | 3 | #define RF_FREQUENCY 868000000 // Hz |
steve918 | 0:5acc19265529 | 4 | #define TX_OUTPUT_POWER 14 // 14 dBm |
steve918 | 0:5acc19265529 | 5 | #define LORA_BANDWIDTH 125000 // LoRa default, details in SX1276::BandwidthMap |
steve918 | 0:5acc19265529 | 6 | #define LORA_SPREADING_FACTOR LORA_SF7 |
steve918 | 0:5acc19265529 | 7 | #define LORA_CODINGRATE LORA_ERROR_CODING_RATE_4_5 |
steve918 | 0:5acc19265529 | 8 | |
steve918 | 0:5acc19265529 | 9 | #define LORA_PREAMBLE_LENGTH 8 // Same for Tx and Rx |
steve918 | 0:5acc19265529 | 10 | #define LORA_SYMBOL_TIMEOUT 5 // Symbols |
steve918 | 0:5acc19265529 | 11 | #define LORA_FIX_LENGTH_PAYLOAD_ON false |
steve918 | 0:5acc19265529 | 12 | #define LORA_FHSS_ENABLED false |
steve918 | 0:5acc19265529 | 13 | #define LORA_NB_SYMB_HOP 4 |
steve918 | 0:5acc19265529 | 14 | #define LORA_IQ_INVERSION_ON false |
steve918 | 0:5acc19265529 | 15 | #define LORA_CRC_ENABLED true |
steve918 | 0:5acc19265529 | 16 | #define RX_TIMEOUT_VALUE 5000 // in ms |
steve918 | 0:5acc19265529 | 17 | |
steve918 | 0:5acc19265529 | 18 | // Pin Map edit with care |
steve918 | 0:5acc19265529 | 19 | |
steve918 | 0:5acc19265529 | 20 | #define USBRX PA_10 |
steve918 | 0:5acc19265529 | 21 | #define USBTX PA_9 |
steve918 | 0:5acc19265529 | 22 | |
steve918 | 0:5acc19265529 | 23 | #define LED PA_5 |
steve918 | 0:5acc19265529 | 24 | #define TX_IND PC_2 |
steve918 | 0:5acc19265529 | 25 | |
steve918 | 0:5acc19265529 | 26 | #define LORA_SPI_MOSI PB_15 |
steve918 | 0:5acc19265529 | 27 | #define LORA_SPI_MISO PB_14 |
steve918 | 0:5acc19265529 | 28 | #define LORA_SPI_SCLK PB_13 |
steve918 | 0:5acc19265529 | 29 | #define LORA_CS PB_12 |
steve918 | 0:5acc19265529 | 30 | #define LORA_RESET PB_10 |
steve918 | 0:5acc19265529 | 31 | #define LORA_DIO0 PB_11 |
steve918 | 0:5acc19265529 | 32 | #define LORA_DIO1 PC_13 |
steve918 | 0:5acc19265529 | 33 | #define LORA_DIO2 PB_9 |
steve918 | 0:5acc19265529 | 34 | #define LORA_DIO3 PB_4 |
steve918 | 0:5acc19265529 | 35 | #define LORA_DIO4 PB_3 |
steve918 | 0:5acc19265529 | 36 | #define LORA_DIO5 PA_15 |
steve918 | 0:5acc19265529 | 37 |