First revision of tactile mouse code

Committer:
JPB515
Date:
Mon Apr 08 16:57:36 2019 +0000
Revision:
0:f254a3cfe0f6
First publish of tactile mouse code;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JPB515 0:f254a3cfe0f6 1 #ifndef TAXEL_HPP
JPB515 0:f254a3cfe0f6 2 #define TAXEL_HPP
JPB515 0:f254a3cfe0f6 3
JPB515 0:f254a3cfe0f6 4 #include "mbed.h"
JPB515 0:f254a3cfe0f6 5
JPB515 0:f254a3cfe0f6 6 class taxel{
JPB515 0:f254a3cfe0f6 7 public:
JPB515 0:f254a3cfe0f6 8 taxel();
JPB515 0:f254a3cfe0f6 9 taxel(int x_, int y_);
JPB515 0:f254a3cfe0f6 10 ~taxel();
JPB515 0:f254a3cfe0f6 11 void step1();
JPB515 0:f254a3cfe0f6 12 void step2();
JPB515 0:f254a3cfe0f6 13 void step3();
JPB515 0:f254a3cfe0f6 14 void step4();
JPB515 0:f254a3cfe0f6 15 void stop();
JPB515 0:f254a3cfe0f6 16
JPB515 0:f254a3cfe0f6 17 void down();
JPB515 0:f254a3cfe0f6 18 void up();
JPB515 0:f254a3cfe0f6 19
JPB515 0:f254a3cfe0f6 20 void stepDown();
JPB515 0:f254a3cfe0f6 21 void stepUp();
JPB515 0:f254a3cfe0f6 22
JPB515 0:f254a3cfe0f6 23 void selectMotor(int x, int y);
JPB515 0:f254a3cfe0f6 24
JPB515 0:f254a3cfe0f6 25 void setTarget(int target);
JPB515 0:f254a3cfe0f6 26 bool stepToTarget();
JPB515 0:f254a3cfe0f6 27
JPB515 0:f254a3cfe0f6 28 private:
JPB515 0:f254a3cfe0f6 29 int x;
JPB515 0:f254a3cfe0f6 30 int y;
JPB515 0:f254a3cfe0f6 31 int lastStep;
JPB515 0:f254a3cfe0f6 32 int steps;
JPB515 0:f254a3cfe0f6 33 int targetSteps;
JPB515 0:f254a3cfe0f6 34 double delay;
JPB515 0:f254a3cfe0f6 35 bool changed;
JPB515 0:f254a3cfe0f6 36 Timeout deactivate;
JPB515 0:f254a3cfe0f6 37 };
JPB515 0:f254a3cfe0f6 38
JPB515 0:f254a3cfe0f6 39 #endif