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 TMP102 low-power digital temperature sensor #141

Merged
merged 3 commits into from
Apr 3, 2020

Conversation

yannishuber
Copy link
Contributor

This adds a driver for the TMP102 low-power digital temperature sensor.

Tested on the HiFive1 Rev B with the example code.

@deadprogram
Copy link
Member

Hi, @yannishuber thank you for the contribution. A couple of comments:

What do you think?

@aykevl
Copy link
Member

aykevl commented Mar 30, 2020

Additionally to what Ron said, I think it's best to standardize on a single SI unit (Celsius). This means that all temperature sensors have a single interface. The conversion to Fahrenheit is very simple so if an application wants to display in Fahrenheit it can do that. There is no reason to repeat it in every temperature sensor driver.

@yannishuber
Copy link
Contributor Author

Thanks for the feedback, I made some changes accordingly. The signature of ReadTemperature() now matches the one of the other devices. I also removed the unit conversion.

@deadprogram
Copy link
Member

Looks good, thanks for making the changes.

Now squashing/merging.

@deadprogram deadprogram merged commit 6f213e9 into tinygo-org:dev Apr 3, 2020
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.

3 participants