Hello,
I have connected water flow sensor with my beaglebone black and trying to
measure the water flow. Below is my code which I have written in bonescript
but I am sure it is not giving me the right results. Can someone help?
var b = require('bonescript');
var pin = 'P8_12';
b.pinMode(pin, b.INPUT);
b.attachInterrupt(pin, true, b.RISING, interruptCallback);
var inerruptCall = 1;
var Calc = 0;
function interruptCallback(x){
inerruptCall++;
Calc = (inerruptCall * 60 / 7.5);
console.log(Calc);
//console.log(x);
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
which returns output like below:
debugger listening on port 15454
NaN
16
24
32
40
48
56
64
72
80
88
96
104
112
120
128
136
144
152
160
168
176
184
--
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.