Hello,

I got the software from a book, "Programming the BeagleBone Black."

Seth

On Friday, June 30, 2017 at 9:54:56 AM UTC-5, Dennis Lee Bieber wrote:
>
> On Thu, 29 Jun 2017 17:46:14 -0700 (PDT), Mala Dies 
> <fun...@gmail.com <javascript:>> declaimed the following: 
>
> >    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); 
> >    } 
>
>         Is that a cut&paste, or did you type it in by hand? 
>
>         I ask as I note that there is no semicolon ending the line 
> declaring 
> tempF 
>
>         Someone else will have to comment on whether that language does 
> automatic promotion to float on division, otherwise they could be a loss 
> of 
> significance ( 2/3 => 0 vs 2.0/3.0 => 0.66667) 
>
> -- 
>         Wulfraed                 Dennis Lee Bieber         AF6VN 
>     wlf...@ix.netcom.com <javascript:>    HTTP://wlfraed.home.netcom.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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/ec45d101-2bfb-4ae7-b592-420b1e81a189%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to