pulse_counter
0.0.1 • Public • Published 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);
Dependencies (1)
Dev Dependencies (0)
Package Sidebar
Install
Weekly Downloads