TMP36 and Software and The Info. Was Correct/Seth

Hello,

This is the print or reading from the software I produced from the book. It works.

I tried a BBB with Grove Cape and it shut the board down and would not power on. I tried it on the BBGW and it fried my TMP36 sensor. I touched the sensor and it was blistering hot. I got burned, i.e. you mothers.

So, in hindsight, I will stick with the BBB and BBBW for now. I have an older model that is only 2GB. It worked right from the get-go.

Here is the software and it works with GNDA_ADC and pin ‘P9_40’.

var b = require(‘bonescript’);

function readTemp() {

b.analogRead(‘P9_40’, displayTemp);

}

function displayTemp(reading) {

var millivolts = reading.value * 1800;

var C = (millivolts - 500) / 10;

var F = (C * 9/5) + 32

console.log("C = " + C + "\tF = " + F);

}

setInterval(readTemp, 9000);

So…all is well that ends well.

Seth

All is well that ends.

— Graham