Interface to a standard tarco sensor. Measure the periode and the cal the speed
Diff: Tarco.h
- Revision:
- 2:c50da089786a
- Child:
- 3:6d3f2034e5f1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Tarco.h Thu Nov 07 09:23:27 2013 +0000 @@ -0,0 +1,31 @@ +#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 \ No newline at end of file