Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add driver for MCP9808 i2c temperature sensor #676

Merged
merged 12 commits into from
May 12, 2024

Conversation

gmonarque
Copy link
Contributor

Hello,

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

  • Temperature reading
  • Precision configuration

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

gmonarque and others added 9 commits May 2, 2024 22:04
wip

init example

debug

wip temp reading

reading temperature + configure resolution

fix illogical resolution constants ordering

cleanup
@deadprogram
Copy link
Member

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
Copy link
Contributor Author

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

@deadprogram
Copy link
Member

Thank you very much @gmonarque now squash/merging!

@deadprogram deadprogram merged commit 2a621dc into tinygo-org:dev May 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants