* Adding pico-extra utils
* RP2040 can now go to deepsleep
* First RP2040 DeepSleep code - TODO : do better and restore
* FIX RAK11310 compilation (revert SDK + missing defines)
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
* Add stub health telemetry module
* Add detection for MAX30102 Health Sensor
It lives on I2C bus at 0x57, which conflicts with an existing
sensor. Add code to check the PARTID register for its response 0x15
per spec.
* Add detection for MLX90614
An IR Temperature sensor suitable for livestock monitoring.
* Add libraries for MLX90614 and MAX30102 sensors
* Fix Trunk
* Add support for MLX90614 IR Temperature Sensor
* Add support for MAX30102 (Temperature)
* Make it build - our first HealthTelemetry on the mesh.
If a MAX30102 is connected, its temperature will be sent to the
mesh as HealthTelemetry.
* Add spo2 and heart rate calculations to MAX30102
* Switch MLX90614 to Adafruit library
Sparkfun was having fun with SDA/SCL variables which we can avoid
by switching to this highly similar library.
* Enable HealthTelemetry if MLX90614 detected
* Change MLX90614 emissivity for human skin.
* Add health screen!
* Remove autogenerated file from branch
* Preparing for review
* Fix MeshService master sync from before.
* Prepare for review
* For the americans
* Fix native build
* Fix for devices with no screen
* Remove extra log causing issues
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>
* Toggle Blutooth with Fn+b shortcut
Problem:
As many are aware, ESP32 devices are known for their high power consumption. For instance, the Heltec ESP32 V3 draws around 110mA when powered on with the screen active and connected to a phone via Bluetooth. The Bluetooth radio alone is responsible for approximately 50mA of that consumption. For keyboard-based standalone devices, which rarely need Bluetooth other than for changing settings, users were forced to keep Bluetooth on regardless of necessity. There was no way to toggle Bluetooth on or off without physically connecting the device to a computer via serial or using the admin channel, which required another node for access.
Solution:
I implemented a new feature that allows users to turn off Bluetooth on keyboard devices by pressing Fn+b and turn it back on when needed. This enhancement significantly improves power efficiency for these devices.
Result:
With Bluetooth off, the device now consumes only 55mA. When combined with Power Save mode, the consumption can drop as low as 11mA, a substantial reduction from the previous 110mA. Users can still easily reconnect to a phone using the shortcut when necessary, offering greater flexibility and extended battery life.
* Remove 1 reboot at least.
I was able to prevent a reboot using the disableBluetooth(); command, current tested at 47-55mA, it doesn't require a reboot to turn off, but it does need reboot to turn back on.
* Update CannedMessageModule.cpp
* Fix LED pinout for T-Echo board marked v1.0, date 2021-6-28
* Merge PR #420
* Fixed double and missing Default class.
* Use correct format specifier and fixed typo.
* Removed duplicate code.
* Fix error: #if with no expression
* Fix warning: extra tokens at end of #endif directive.
* Fix antenna switching logic. Complementary-pin control logic is required on the rp2040-lora board.
* Fix deprecated macros.
* Set RP2040 in dormant mode when deep sleep is triggered.
* Fix array out of bounds read.
* Admin key count needs to be set otherwise the key will be zero loaded after reset.
* Don't reset the admin key size when loading defaults. Preserve an existing key in config if possible.
---------
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
There are three different frequencies available for Meshtastic
in the Philippines, each with pros and cons:
433 - 434.7 MHz <10 mW erp
868 - 869.4 MHz <25 mW erp
915 - 918 MHz <250 mW EIRP, no external antennna allowed
Philippines may also use LORA_24 unrestricted at up to 10mW, or up to
250mW if there is no external antennna.
Frequency rules in the Philippines are determined by aggregating the
information in laws, following the circulars referenced in the
[National Radio Frequency Allocation Table (NRFAT)](https://ntc.gov.ph/wp-content/uploads/2022/frequencyallocations/NRFAT_Rev_2020.pdf)
and then circulars that amend the circulars referenced in the NRFAT.
A full description of the regulatory basis can be found in the github issue:
https://github.com/meshtastic/firmware/issues/4948#issuecomment-2394926135
For 433MHz and 868MHz we refer to the Low Power Equipment rules for
"Non-specific Short Range Devices, Telemetry, Telecommand, Alarms,
Data In General and Other Similar Applications.".
For 915MHz and Wireless Data Network Services indoor device rules.
A device approved by the NTC is required for any use of Meshtastic
in the Philippines.
fixes https://github.com/meshtastic/firmware/issues/4948
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Previously our debug message for screens blandly stated
"Module wants a UI Frame"
This patch replaces the word Module with the name of the Module
in need of a frame a frame, enhancing debugging ability.
GetTimeSinceMeshPacket was duplicated in PowerTelemetry and
EnvironmentalTelemetry, albeit one had a cooler name than the other.
As we add HealthTelemetry, to avoid creating a third instance of
this method, let's move it somewhere that makese sense.
Adds a new method GetTimeSinceMeshPacket to MeshService and updates
EnvironmentTelemetry and PowerTelemetry to use it.
* added up to 3 channels via userprefs
* added up to 3 channels via userprefs
* added up to 3 channels via userprefs
* trunk fmt
* Added USERPREFS for GPS MODE
In 2020, geeksville had a NRF52840-dk development board with a
busted oscilliator. Let's retire it from service :)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
The lora-relay boards were important pathfinders for nrf52
support some years back. They are no longer commonly produced and
there are now many nrf52 options on the market. Retire these
boards and associated variant.
* Enabling Ve pin on T114
Problem:
The Ve pin was not enabled in the firmware, and it was supposed to control the power to the GPS via the GPS_EN pin. As a result, users were forced to rely on the 3.3V pin to power their additional peripherals, which caused a constant power draw from the battery, even when the node was in deep sleep mode.
Solution:
To resolve this, Todd_Hervert and I decided to remove the GPS power toggle after testing revealed that the GPS only consumes 1mA in soft sleep mode. This minimal power consumption allowed us to enable the Ve pin without causing significant battery drain. Additionally, we added a delay to the I2C initialization process, as the Ve pin requires a few milliseconds to stabilize, which could prevent some peripherals from booting up in time.
Result:
The GPS operates as usual, drawing only 1mA of power.
The keyboard and other peripherals attached to the Ve pin now power off correctly when the node is shut down.
The I2C check initiates without issues after the delay, allowing all peripherals to function smoothly.
* trunk format
---------
Co-authored-by: Tom Fifield <tom@tomfifield.net>