(Tues 10th Feb 2026) Refactoring the code
This board has a long history. It is labelled slan-031 and sends readings from a BME680 sensor over LoRaWAN.
Currently, it sends temperature, humidity, battery level and atmospheric pressure every 10 minutes.
![]() |
| slan-031 environmental sensor |
However, its charging circuit and antenna connection are broken. So no PV panel input and antenna is glued on.
I have raised Bugzilla bug #2 to track the changes needed http://192.168.1.153/bugzilla/show_bug.cgi?id=2
These being:
1) Code to be refactored into main, display, sensor and comms files.
2) Would like info displayed on reset
3) Would like info display on USER button press
4) Would like red LED to flash when battery below 3.5 V
The transmitted values can be seen by anyone at site:
https://shannontownwetlands.ie/environmental-sensors/drumgeely-polytunnels
![]() |
| Website view of data |
I tried the Claude Code generated files but they would compile so doing the refactoring by hand. But first to add code to GitHub
https://www.geeksforgeeks.org/git/how-to-fix-support-for-password-authentication-was-removed/
Successfully pushed code from rhubarb laptop to GitHub using above but now need GitHub to accept it!
(17:01) Next to start messing with the code!
(18:50) Code looking good now have displays at start of device info and before first transmission of sensor data
![]() |
| Display after a reset of device info |
![]() |
| Display at first transmission of sensor data |
So just three things to do now:
1) Move LoRaWAN code to lorawan.cpp and lorawan.h
2) Show last sensor data and number of transmission since reset when USER button pressed
3) Flash RGB LED as red if battery below 3.5 V
(20:24) Well that's me done for the day. Tag v1.12b just has USER button code to add,
![]() |
| Red LED flashed and this is displayed on low battery (< 3.5 V) |







No comments:
Post a Comment