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

Example does not work correctly at negative temperatures #19

Open
lcgamboa opened this issue Sep 26, 2021 · 0 comments
Open

Example does not work correctly at negative temperatures #19

lcgamboa opened this issue Sep 26, 2021 · 0 comments

Comments

@lcgamboa
Copy link

The example does not work correctly at negative temperatures in DS1621.
To solve the problem, it is necessary to make a casting to char on line 98 for the value to be interpreted as negative.
The code below :

tempC = TinyWireM.receive(); // get the temperature

needs to be changed to:

  tempC = (char)TinyWireM.receive();    // get the temperature
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

No branches or pull requests

1 participant