Skip to content

Conversation

@fivdi
Copy link
Contributor

@fivdi fivdi commented Jan 28, 2018

Currently the TMP36 conversion formula is documented in pins.md as:

let temperature = (Analog.read(0) / 1024) * 330;

The maximum value returned by Analog.read(0) is 1023 so it should be divide by 1023 rather than by 1024. The Adafruit tutorial linked to is also incorrect here. The TPM36 also has a 500mV or 50°C offset that needs to be taken into account. The correct conversion formula is therefore:

let temperature = (Analog.read(0) / 1023) * 330 - 50;

mkellner pushed a commit that referenced this pull request May 3, 2018
mkellner pushed a commit that referenced this pull request May 7, 2018
mkellner pushed a commit that referenced this pull request May 31, 2018
mkellner pushed a commit that referenced this pull request Jun 1, 2018
mkellner pushed a commit that referenced this pull request Jun 9, 2018
mkellner pushed a commit that referenced this pull request Jun 19, 2018
mkellner pushed a commit that referenced this pull request Jun 22, 2018
mkellner pushed a commit that referenced this pull request Jul 5, 2018
mkellner pushed a commit that referenced this pull request Jul 24, 2018
mkellner pushed a commit that referenced this pull request Aug 9, 2018
mkellner pushed a commit that referenced this pull request Aug 13, 2018
mkellner pushed a commit that referenced this pull request Aug 18, 2018
mkellner pushed a commit that referenced this pull request Aug 21, 2018
mkellner pushed a commit that referenced this pull request Aug 28, 2018
mkellner pushed a commit that referenced this pull request Sep 22, 2018
mkellner pushed a commit that referenced this pull request Oct 1, 2018
mkellner pushed a commit that referenced this pull request Oct 11, 2018
mkellner pushed a commit that referenced this pull request Oct 22, 2018
mkellner pushed a commit that referenced this pull request Oct 30, 2018
mkellner pushed a commit that referenced this pull request Nov 13, 2018
mkellner pushed a commit that referenced this pull request Nov 22, 2018
mkellner pushed a commit that referenced this pull request Dec 20, 2018
mkellner pushed a commit that referenced this pull request Dec 21, 2018
mkellner pushed a commit that referenced this pull request Jan 7, 2019
mkellner pushed a commit that referenced this pull request Jan 29, 2019
mkellner pushed a commit that referenced this pull request Feb 14, 2019
mkellner pushed a commit that referenced this pull request Feb 21, 2019
mkellner pushed a commit that referenced this pull request Mar 11, 2019
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.

7 participants