Hello,

How can I print out the reading.value?

Seth

On Thursday, June 29, 2017 at 8:50:44 PM UTC-5, Jason Kridner wrote:
>
>
>
> On Jun 29, 2017, at 9:21 PM, Mala Dies <fun...@gmail.com <javascript:>> 
> wrote:
>
> Hello Rob,
>
> Seth here. I am located in the states. There is a big fault and I am not 
> clued in, obviously. How is F == C? I figured that there would be a part to 
> the software, the section that displays the difference, that tells me/you 
> the C and F reads. 
>
> Seth
>
> P.S. I am in about an 80 degree temp. right now. So, do I need to replace 
> "reading.value" with an actual numerical value? I will keep trying.
>
>
> Try printing the reading.value. I expect you have a wiring issue. Double 
> check it is connected to P9.39. 
>
>
> On Thursday, June 29, 2017 at 8:06:01 PM UTC-5, RobertCNelson wrote:
>>
>>
>>
>> On Thu, Jun 29, 2017 at 7:46 PM, Mala Dies <fun...@gmail.com> wrote:
>>
>>>     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!
>>>
>>
>>
>> You must live near the equator... ;)
>>
>> -40F == -40C
>>
>> This is something norther folk in America & Canada run into every once in 
>> awhile in January...
>>
>> Regards,
>>
>> -- 
>> Robert Nelson
>> https://rcn-ee.com/
>>
> -- 
> 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 beagleboard...@googlegroups.com <javascript:>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/beagleboard/8f5983df-3ad6-47c5-9bae-2f11230984af%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/beagleboard/8f5983df-3ad6-47c5-9bae-2f11230984af%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
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 beagleboard+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/31e69e96-2de3-4424-93c1-263e57c19a80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to