Interface to a standard tarco sensor. Measure the periode and the cal the speed
Tarco.h
- Committer:
- gert_lauritsen
- Date:
- 2013-11-07
- Revision:
- 2:c50da089786a
- Child:
- 3:6d3f2034e5f1
File content as of revision 2:c50da089786a:
#include "mbed.h" #ifndef _Tarco_H #define _Tarco_H class Tarco { private: InterruptIn _tarcosensor; void click(); uint32_t PrevPulses; int AdvPeriode; int NAdv; float AdvSpeed; int NAdvSpeed; Timer t; public: // ******************************************************************************** // * Constructor // * // * @param flowsignal The pin which is connected to the flowsensor. // ******************************************************************************** Tarco(PinName tarcosignal); uint32_t Puls; float Speed(); float RPM(); }; #endif