Demo of DHT11->mDot->TTN
Dependencies: DHT11 libmDot mbed-rtos mbed
Diff: main.cpp
- Revision:
- 13:761b9c929a3f
- Parent:
- 12:e82913ee9c61
- Child:
- 14:e4574212176a
diff -r e82913ee9c61 -r 761b9c929a3f main.cpp --- a/main.cpp Sat Nov 14 20:58:36 2015 +0000 +++ b/main.cpp Thu May 19 15:18:05 2016 +0000 @@ -39,7 +39,7 @@ #define LORA_TXPOWER 14 // Ignoring sub band for EU modules. -//static uint8_t config_frequency_sub_band = 1; +static uint8_t config_frequency_sub_band = 7; // DS18B20 OneWire pin // D13 on Dev Board, pin 18 on mDot, Compatible with Oxford Flood Network PCB temperature sensor. @@ -123,11 +123,10 @@ logError("Failed to set Ack %d:%s", ret, mDot::getReturnCodeString(ret).c_str()); } -// Not applicable for 868MHz in EU -// if ((ret = dot->setFrequencySubBand(config_frequency_sub_band)) != mDot::MDOT_OK) { -// initStatus = false; -// logError(dot, "failed to set frequency sub band", ret); -// } + //Not applicable for 868MHz in EU + if ((ret = dot->setFrequencySubBand(config_frequency_sub_band)) != mDot::MDOT_OK) { + logError("failed to set frequency sub band", ret); + } logInfo("Set Network Address"); if ((ret = dot->setNetworkAddress(networkAddr)) != mDot::MDOT_OK) {