var b = require('bonescript');
function readTemp() {
b.analogRead('P9_39', displayTemp);
}
function displayTemp(reading) {
var millivolts = reading.value * 1800;
var tempC = (millivolts - 500) / 10;
var tempF = (tempC * 9/5) + 32
console.log("TempC = " + tempC + "\t Temp F = " + tempF);
}
setInterval(readTemp, 100000);
Okay...
This is my software from "Programming the BeagleBone Black" in the
"hardware interfacing" section. I am messing with a TMP36 sensor for analog
temp. reads.
The issue is this:
I keep getting a similar read for my C and F reads. I should be able to get
the F read but unfortunately, I get the same as the C read.
Seth
<https://lh3.googleusercontent.com/-6uATaSztQgs/WVWfRwRFJNI/AAAAAAAAJy0/i2WaNX-KV9QkFnW1PE958ZyFCugDxQeaACLcBGAs/s1600/forBBBfiles.JPG>
P.S. Try your TMP36 sensor and this software and get back to me. I would
love to know about the value(s) I am creating and why they are returning
the listed read(s). Oh and here is a photo. See!
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beagleboard/0fc486b7-a15f-46bb-aa4a-622b847b70da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.