mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 09:43:03 +00:00
Add health telemetry module (#4927)
* 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>
This commit is contained in:
@@ -356,7 +356,18 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
|
||||
break;
|
||||
|
||||
SCAN_SIMPLE_CASE(SHTC3_ADDR, SHTC3, "SHTC3 sensor found\n")
|
||||
SCAN_SIMPLE_CASE(RCWL9620_ADDR, RCWL9620, "RCWL9620 sensor found\n")
|
||||
case RCWL9620_ADDR:
|
||||
// get MAX30102 PARTID
|
||||
registerValue = getRegisterValue(ScanI2CTwoWire::RegisterLocation(addr, 0xFF), 1);
|
||||
if (registerValue == 0x15) {
|
||||
type = MAX30102;
|
||||
LOG_INFO("MAX30102 Health sensor found\n");
|
||||
break;
|
||||
} else {
|
||||
type = RCWL9620;
|
||||
LOG_INFO("RCWL9620 sensor found\n");
|
||||
}
|
||||
break;
|
||||
|
||||
case LPS22HB_ADDR_ALT:
|
||||
SCAN_SIMPLE_CASE(LPS22HB_ADDR, LPS22HB, "LPS22HB sensor found\n")
|
||||
@@ -394,6 +405,7 @@ void ScanI2CTwoWire::scanPort(I2CPort port, uint8_t *address, uint8_t asize)
|
||||
SCAN_SIMPLE_CASE(NAU7802_ADDR, NAU7802, "NAU7802 based scale found\n");
|
||||
SCAN_SIMPLE_CASE(FT6336U_ADDR, FT6336U, "FT6336U touchscreen found\n");
|
||||
SCAN_SIMPLE_CASE(MAX1704X_ADDR, MAX17048, "MAX17048 lipo fuel gauge found\n");
|
||||
SCAN_SIMPLE_CASE(MLX90614_ADDR, MLX90614, "MLX90614 IR temp sensor found\n");
|
||||
|
||||
case ICM20948_ADDR: // same as BMX160_ADDR
|
||||
case ICM20948_ADDR_ALT: // same as MPU6050_ADDR
|
||||
|
||||
Reference in New Issue
Block a user