Hi guys,
So I want to use the function analogRead() with a while loop, like so:
var b = require('bonescript');
while (true) {
analogRead('P9_36', printStatus);
}
function printStatus(x) {
console.log('x.value = ' + x.value);
}
But my problem is that nothing is printing out on the terminal. I think the
problem with this is that analogRead is asynchronous or something? Anyway,
what I think is happening is that beaglebone is waiting for all the
analogReads to reply before it will print out all the values on the
terminal at once. But what I want is for beaglebone to print the adc values
to the terminal as they come.
Thanks for the help.
--
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].
For more options, visit https://groups.google.com/d/optout.