Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#26 Bibo patch: edge counting

open
nobody
None
5
2012-05-17
2012-05-17
Carl Troein
No

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.

Discussion

  • Carl Troein
    Carl Troein
    2012-05-17

    Diff against bibo-0.04-ms2

     
    Attachments