tinygo-org / drivers

TinyGo drivers for sensors, displays, wireless adaptors, and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
https://tinygo.org
BSD 3-Clause "New" or "Revised" License
584 stars 180 forks source link

Add driver for MCP9808 i2c temperature sensor #676

Closed gmonarque closed 1 month ago

gmonarque commented 1 month ago

Hello,

I added basic support for the MCP9808 temp sensor. This includes:

I can't bother to implement the alerts feature, but if anyone really needs it let me know and I'll do it.

Datasheet: https://cdn-shop.adafruit.com/datasheets/MCP9808.pdf Module: https://www.adafruit.com/product/1782

Thanks

deadprogram commented 1 month ago

Hello @gmonarque thank you very much for adding this sensor.

Could you please add it to the smoke tests? See https://github.com/tinygo-org/drivers/blob/dev/smoketest.sh#L132

Thanks!

gmonarque commented 1 month ago

@deadprogram Hello, I've updated the smoke tests as requested, I hope everything is good now! Thanks :)

deadprogram commented 1 month ago

Thank you very much @gmonarque now squash/merging!