LoRa 1-Wire Thermometer
With this kit you can measure temperatures with one or more connected DS18B20 or DS18S20 temperature sensors. The values are then sent wirelessly to a LoRa gateway.
To receive the data, you can use The Things Network, a community network.
What You Will Need
Firmware Upload
Step 1: Download the latest HARDWARIO Playground
Step 2: Connect the Core Module to your computer
Step 3: In Playground, open the Firmware tab, select hardwario/twr-lora-1wire-thermometer and flash the firmware
The firmware appears in the list only after you tick Show all.
Step 4: After the upload, the red LED on the Core Module lights up for 2 seconds and then goes off
LoRa Configuration
To configure the LoRa keys, follow the LoRa AT Commands Configuration guide.
Transmitting the Data
The thermometer sends a LoRa packet:
- After power-up, that is, when you insert the batteries
- Every 15 minutes if the measured values do not change
- When you press the button
- When you enter
AT$SENDin the console
Reading the Data
The data is encoded in the LoRa message, and you get the values back by extracting the right bits. The Python script decode.py in the firmware repository does this for you.
Pass the received HEX string to decode.py as a parameter:
>>> python3 decode.py 001D00E600E8012200E500D600E5
Header : BOOT
Voltage : 2.9
Sensor 0 : 23.0
Sensor 1 : 23.2
Sensor 2 : 29.0
Sensor 3 : 22.9
Sensor 4 : 21.4
Sensor 5 : 22.9