四輪オムニの足回りを動かすプログラム

Dependencies:   mbed

motor/motor.hpp

Committer:
m_smt
Date:
22 months ago
Revision:
0:39c2bb18192b

File content as of revision 0:39c2bb18192b:

#ifndef MOTOR_
#define MOTOR_

#include <mbed.h>

#if 0
  ~example~
    Motor name(ピン名1,ピン名2)でこのクラスを使うことができるようになる
    name.revolution(pwmの値)でモータを回すことができる
    name.reset()でモータの値を0にする
#endif

class Motor
{
public:
    Motor(PinName pin_a,PinName pin_b);
    void revolution(double);
    void reset();
private:
    PwmOut motor1;
    PwmOut motor2;
};

#endif