hawkw / eclss

Environmental Controls and Life Support Systems
14 stars 1 forks source link

add support for the ENS160 #16

Open hawkw opened 1 year ago

hawkw commented 1 year ago

this is another I2C tVOC/eCO2 sensor, which i bought because apparently i collect these now. there's a nice embedded-hal driver for it on crates.io: https://docs.rs/ens160/latest/ens160/

in some ways, this seems like a nicer part than the SGP30 we already support. it seems substantially less finicky, and doesn't need to be polled at 1Hz to give us good data, and it has a nice command to read sensor status which includes a flag to tell you if the sensor is warming up/calibrating itself or not (rather than making the user code guess based on how many times its been read from like the SGP30 does). it can also be configured to send you an IRQ when it has new data, which seems nice, although this may not fit in with our current architecture all that nicely.