This patch adds my old edge counting to bibo. The concept and implementation are simple: count how many times a sensor goes from low to high or vice versa. (A switch from low to high happens when two samples are above the 'high' threshold and none of the samples between them are below the 'low' threshold. Likewise from high to low, mutatis mutandis.) The reason I created this code was that I wanted to track the position of a gear along a rack without using a rotation sensor - a rotating part hitting a touch sensor could then accomplish the same task.
In addition, I've fixed a few compilation errors related to commenting out various config.h options.
Log in to post a comment.