Skip to content

Commit

Permalink
Added aht21 sensor to the drivers
Browse files Browse the repository at this point in the history
the aht21 uses the same library as the aht20, but a different i2c address is used so this needed to be added so the the aht21 sensor can be used.
  • Loading branch information
thussaiththelaw authored Nov 12, 2024
1 parent 270344d commit 0411093
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/i2c/WipperSnapper_I2C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ bool WipperSnapper_Component_I2C::initI2CDevice(

uint16_t i2cAddress = (uint16_t)msgDeviceInitReq->i2c_device_address;
if ((strcmp("aht20", msgDeviceInitReq->i2c_device_name) == 0) ||
(strcmp("aht21", msgDeviceInitReq->i2c_device_name) == 0) ||
(strcmp("am2301b", msgDeviceInitReq->i2c_device_name) == 0) ||
(strcmp("am2315c", msgDeviceInitReq->i2c_device_name) == 0) ||
(strcmp("dht20", msgDeviceInitReq->i2c_device_name) == 0)) {
Expand Down

0 comments on commit 0411093

Please sign in to comment.