Joshua Brown
/
TactileMouse
First revision of tactile mouse code
Diff: taxel.hpp
- Revision:
- 0:f254a3cfe0f6
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/taxel.hpp Mon Apr 08 16:57:36 2019 +0000 @@ -0,0 +1,39 @@ +#ifndef TAXEL_HPP +#define TAXEL_HPP + +#include "mbed.h" + +class taxel{ + public: + taxel(); + taxel(int x_, int y_); + ~taxel(); + void step1(); + void step2(); + void step3(); + void step4(); + void stop(); + + void down(); + void up(); + + void stepDown(); + void stepUp(); + + void selectMotor(int x, int y); + + void setTarget(int target); + bool stepToTarget(); + + private: + int x; + int y; + int lastStep; + int steps; + int targetSteps; + double delay; + bool changed; + Timeout deactivate; +}; + +#endif \ No newline at end of file