Fahad Mirza
/
Nucleo_HXC900
A demo application for HXC900 LoRaWAN module using Nucleo-L053R8.
Diff: lora_conf.h
- Revision:
- 21:f1d561ed31a1
- Parent:
- 20:1ed8723a3a87
- Child:
- 22:5b77cf59d630
--- a/lora_conf.h Mon Sep 24 16:23:27 2018 +0000 +++ b/lora_conf.h Tue Oct 09 22:15:01 2018 +0000 @@ -75,9 +75,11 @@ /* Prepare an unconfirmed uplink packet for port 2 */ uint8_t size = 0; - float temperatureValue = temperatureSensor.read(); // Converts and read the analog input value (value from 0.0 to 1.0) - uint16_t temperatureValueInt = temperatureValue * 3300; // Change the value to be in the 0 to 3300 range - // Checkout our user manual to convert temperatureValueInt into degree celcius + // Converts and read the analog input value (value from 0.0 to 1.0) + float temperatureValue = temperatureSensor.read(); + // Change the value to be in the 0 to 3300 range + uint16_t temperatureValueInt = temperatureValue * 3300; + // Checkout our user manual to convert temperatureValueInt into degree Celcius buffer[size++] = (temperatureValueInt >> 8) & 0xFF; buffer[size++] = temperatureValueInt & 0xFF;