Edge Collective

Inexpensive Heltec WiFi + LoRa Gateway Setup

Arduino IDE Setup

Board Manager URL for ESP32:

https://dl.espressif.com/dl/package_esp32_index.json

Board Manager URL for Feather M0 LoRa:

https://adafruit.github.io/arduino-board-index/package_adafruit_index.json

Guides

Robotzero

Basically need to just load this config file in 'Additional Board Manager URLs' field in Preferences in Arduino IDE:

https://dl.espressif.com/dl/package_esp32_index.json

Then can select Heltec WiFi Lora (V2) (the board we're using).

WiFi scan worked.

wifi scan
Initial wifi scan test.

Display Library

U8g2 library for Arduino covers a wide range of common displays.

Test code that will scan wifi and display the results on the screen.

Main Heltec Documentation

Heltec Wifi Lora 32

Coding and Setup Debugging ...

Instructable that has a nice set of diagrams of pinouts

Heltec Library

Main github reference for Heltec devices -- includes KiCad file for device

Heltec WiFi LoRa send / receive

Heltec syncword issue

Robot Zero One LoRa receiver demo

They suggest using this LoRa library.

Working LoRa Example

Follow Robot Zero One LoRa receiver demo;

use this LoRa library;

And this example.

Receive and display. Can get it posted on the display using this example with U8g2 display library -- basically works.

Radiohead Example

Basic RFM95 Receive code for Heltec. Works.

Low Power sleep

Discussion of entering low power sleep mode

HTTP GET AND POST

Tutorial here.

Working code to do basic JSON post to FarmOS here.

ArduinoJSON SerializeJSON documentation.

HTTP JSON POST TO FARMOS

Using loop-updated variables, code is here.

HELTEC WIFI LORA POST TO FARMOS

Using dummy variables, not yet parsing incoming radio, code is here

Github Repo

Feather sends JSON data; Heltec receives, parses, posts to FarmOS; code is here.

1-wire temp sensor on remote

Tutorial

Sleep Modes for ESP32

Some nice notes here

Deep sleep example code

Able to get about 2 mA in deep sleep using Heltec. ...

.. then turned off lora radio and got 1 mA.

gist of the code to do this is here

Further discussion of low power modes here.

ESP32 Data logging

Nice tutorial here

Single-channel gateway guides

Using ESP8266

From Sparkfun

Appcodelabs using MQTT

From CNX Software -- looks like they use dozens of nodes here.