Fork of encoder2 by
encoder2.h
- Committer:
- kenken0721
- Date:
- 2018-04-08
- Revision:
- 3:03bca13f0bf6
- Parent:
- 2:82a12d9f0bca
File content as of revision 3:03bca13f0bf6:
#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