No description
This repository has been archived on 2026-11-17. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • C++ 93%
  • JavaScript 7%
Find a file
2022-11-01 12:25:38 +01:00
.vscode initiall commit 2022-10-31 20:35:40 +01:00
include initiall commit 2022-10-31 20:35:40 +01:00
lib send temperature via lora 2022-10-31 21:58:44 +01:00
src move bat voltage check to startup 2022-11-01 12:25:38 +01:00
test initiall commit 2022-10-31 20:35:40 +01:00
.gitignore add config file 2022-11-01 10:49:20 +01:00
.gitlab-ci.yml build firmware with ci pipeline 2022-11-01 10:50:39 +01:00
platformio.ini add lora libraries 2022-10-31 20:53:55 +01:00
Readme.md add readme 2022-11-01 11:03:32 +01:00
uplink-decoder.js don't allow battery percentage to be below 0 and above 100 2022-11-01 11:11:57 +01:00

Lora Temperature Sensor

This is a simple project for a outdoor temperature sensor, which sends the temperature via lorawan. The sensor is based on the Heltect ESP32 LoRa Board and a DS18B20 temperature sensor. In the config file is already the appkey configured to make the setup as simple as possible.

Hardware Setup

Connect the DS18B20 sensor pin (yellow) to GPIO17 and a 4,7k Resistor between vext and GPIO17. Then connect the positive (red) wire to VEXT and the negative (black) wire to GND. Now flash the firmware, either using platformio to compile it yourself or use the precompiled firmware from the CI Pipeline. After flashing connect to the Serial console and note down the DEVEUI.

TTN Setup

  1. Create a new application in TTN
  2. Create a new device in the application:
    1. Specify the device manual:
      1. Frequency Plan: EU 863, SF9 for RX2
      2. Lorawan Version: 1.0.0
      3. JoinEUI: 0000000000000000
      4. DevEUI: The one you noted down before
      5. AppKey: 21DD665CA8AC4741CB40AEFB6AFF474E
      6. End device ID: The name of the device
      7. Create the device
    2. Go to payload formatters -> uplink and set the type to Custom JavaScript. Afterwards paste the content from uplink-decoder.js into the field and save it.
    3. Reconnect power to your sensor and wait for the first message to arrive in the console.