田中くんのモタドラを制御する石本さんのやつ

T_motor.h

Committer:
fujikenac
Date:
2017-08-13
Revision:
1:5bd161b83ce0
Parent:
0:e10d08530490
Child:
8:2759e619969a

File content as of revision 1:5bd161b83ce0:

#ifndef T_motor_H
#define T_motor_H

class T_motor
{
    private:
        I2C i2c;
        char addr;
    public:
    void setAddr(int addr_);
    void init(char addr,int freq);
    T_motor(PinName sda,PinName scl,int addr);
    T_motor(I2C& i2c_,int addr);
    T_motor& operator=(float fval);
    void control(float fval);
    bool run(char mode,char speed);
    bool stop();
    bool free();
};
#endif