First revision of tactile mouse code

taxel.hpp

Committer:
JPB515
Date:
2019-04-08
Revision:
0:f254a3cfe0f6

File content as of revision 0:f254a3cfe0f6:

#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