forked from 1technophile/OpenMQTTGateway
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LORA] Improvements, change frequency, webUI, Oled support, add boards (
1technophile#1742) * [LORA] Capability to change LORA frequency and Add OLED Merge of the 2 environments for TTGO V1 * Merge messages keys with upper level json * Id as a sub topic * Add display and state measures * Add frequency configuration through WebUI * Add parameters * Add auto discovery * Add node example for ttgo lora32 v1 * Add environments and fix scope * Support for sync word as a byte * Fix TX Power setting * Add LoRa gateway description * Add onlyknown filter
- Loading branch information
1 parent
3d20995
commit 246423a
Showing
18 changed files
with
990 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.pio | ||
.vscode/.browse.c_cpp.db* | ||
.vscode/c_cpp_properties.json | ||
.vscode/launch.json | ||
.vscode/ipch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# OpenMQTTGateway LoRa Node Example | ||
This repository contains an example of a LoRa node program designed for the ESP32 platform. The program reads the internal temperature of the ESP32, packages the data into a JSON format, and sends it over LoRa. | ||
|
||
## Features: | ||
* Uses an SX12XX LoRa module. | ||
* Displays packet sending status and temperature data on an SSD1306 OLED display. | ||
* Sends the ESP32's MAC address as the node ID. | ||
* Sends temperature data in Celsius. | ||
|
||
## Hardware Requirements: | ||
* ESP32 development board. | ||
* SX12XX LoRa module. | ||
* SSD1306 OLED display. | ||
|
||
## Pin Configuration: | ||
* SCK - GPIO5 | ||
* MISO - GPIO19 | ||
* MOSI - GPIO27 | ||
* SS - GPIO18 | ||
* RST - GPIO14 | ||
* DI0 - GPIO26 | ||
|
||
## Setup: | ||
### Hardware Setup: | ||
|
||
Connect the SX1278 LoRa module and the SSD1306 OLED display to the ESP32 according to the pin configuration. | ||
Ensure that the OLED display is powered correctly. | ||
|
||
### Software Setup: | ||
|
||
* Clone this repository. | ||
* Open the provided node program with PlatformIO | ||
* Upload the program to your ESP32. | ||
|
||
## Usage: | ||
Power on the ESP32. | ||
The OLED display will show the status of the packet being sent and the current temperature reading. | ||
The built-in LED on the ESP32 will blink once every time a packet is sent. | ||
Monitor the serial output (at 115200 baud rate) to see the JSON formatted data being sent. | ||
|
||
## Data Format: | ||
The data is sent in the following JSON format: | ||
|
||
```json | ||
{ | ||
"model": "ESP32TEMP", | ||
"id": "ESP32_MAC_ADDRESS", | ||
"tempc": "TEMPERATURE_IN_CELSIUS" | ||
} | ||
``` | ||
|
||
## Troubleshooting: | ||
LoRa Initialization Failed: Ensure that the SX1278 LoRa module is connected correctly and powered on. | ||
OLED Display Not Working: Check the connections and ensure that the display is powered correctly. | ||
No Temperature Data: Ensure that the ESP32's internal temperature sensor is functional. | ||
Contributing: | ||
Feel free to contribute to this example by opening issues or submitting pull requests. Any feedback or improvements are welcome! | ||
|
||
I hope this README helps users understand and use your program! Adjustments can be made as necessary to fit any additional details or changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
; PlatformIO Project Configuration File | ||
; | ||
; Build options: build flags, source filter | ||
; Upload options: custom upload port, speed and extra flags | ||
; Library options: dependencies, extra library storages | ||
; Advanced options: extra scripting | ||
; | ||
; Please visit documentation for the other options and examples | ||
; https://docs.platformio.org/page/projectconf.html | ||
|
||
[env:ttgo-lora32-v1] | ||
platform = espressif32 | ||
board = ttgo-lora32-v1 | ||
framework = arduino | ||
lib_deps = | ||
https://github.com/sandeepmistry/arduino-LoRa.git#f4a1d27 | ||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git#f96fd6a | ||
monitor_speed = 115200 | ||
|
||
[env:ttgo-lora32-v21] | ||
platform = espressif32 | ||
board = ttgo-lora32-v21 | ||
framework = arduino | ||
lib_deps = | ||
https://github.com/sandeepmistry/arduino-LoRa.git#f4a1d27 | ||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git#f96fd6a | ||
monitor_speed = 115200 | ||
|
||
[env:heltec-wifi-lora-32] ; Heltec ESP32 Board with SSD1306 display | ||
platform = ${com.esp32_platform} | ||
board = heltec_wifi_lora_32 | ||
framework = arduino | ||
lib_deps = | ||
https://github.com/sandeepmistry/arduino-LoRa.git#f4a1d27 | ||
https://github.com/ThingPulse/esp8266-oled-ssd1306.git#f96fd6a | ||
monitor_speed = 115200 |
Oops, something went wrong.