added AHTx0 sensor (#3977)

* added AHTx0 sensor

* AHT10 definition in protobuf

* AHT10 definition in protobuf

* protobufs

* Management of AHT20+BMP280 module

* missing newline in log

* missing newline in log

* reverted

* reverted .gitignore

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
fzellini
2024-05-31 18:17:53 +02:00
committed by GitHub
parent 17142f8778
commit eddda3ca43
8 changed files with 80 additions and 2 deletions

View File

@@ -45,6 +45,7 @@ class ScanI2C
VEML7700,
RCWL9620,
NCP5623,
AHT10
} DeviceType;
// typedef uint8_t DeviceAddress;

View File

@@ -256,7 +256,12 @@ void ScanI2CTwoWire::scanPort(I2CPort port)
type = BMP_280;
}
break;
#ifndef HAS_NCP5623
case AHT10_ADDR:
LOG_INFO("AHT10 sensor found at address 0x%x\n", (uint8_t)addr.address);
type = AHT10;
break;
#endif
case INA_ADDR:
case INA_ADDR_ALTERNATE:
case INA_ADDR_WAVESHARE_UPS:
@@ -369,4 +374,4 @@ TwoWire *ScanI2CTwoWire::fetchI2CBus(ScanI2C::DeviceAddress address) const
size_t ScanI2CTwoWire::countDevices() const
{
return foundDevices.size();
}
}