pulse_counter
v0.0.1
Published
Pulse counter library for Raspberry pi
Downloads
10
Readme
Pulse counter library for Raspberry pi
Warning this is not tested yet!
/*
"INT_EDGE_FALLING",
"INT_EDGE_RISING"
"INT_EDGE_BOTH"
*/
//pulse source is connected to pin 6. Edge is rising
addon.init(6,"INT_EDGE_RISING");
//start pulse counter
addon.start();
//clear pulse counter
addon.clear();
setTimeout(function() {
//read the count of pulses
console.info(addon.get());
//stop pulse counting
addon.stop();
}, 30000);