Fork of encoder2 by
Diff: encoder2.h
- Revision:
- 2:82a12d9f0bca
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/encoder2.h Tue Mar 27 03:45:26 2018 +0000 @@ -0,0 +1,22 @@ +#ifndef ENCODER_H2 +#define ENCODER_H2 + +#include "mbed.h" + +class Encoder2{ +public : + Encoder2(PinName APin, PinName BPin, PinName ZPin); + int read_rotate(); + int read_z(); + void init(); +private : + InterruptIn A; + DigitalIn B; + DigitalIn Z; + int count; + int zcount; + void flag(); +}; + +#endif +