Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
motor.hpp
- Committer:
- hamohamo
- Date:
- 2021-10-13
- Revision:
- 2:d88ff6dda390
- Parent:
- 1:59244694c2bb
File content as of revision 2:d88ff6dda390:
#ifndef take_motor
#define take_motor
#include "mbed.h"
/*INFO
*coreを使わない場合idはなんでもいいです
*setLimitは出力するpidの上限下限を設定できます
*setPwmでpwm出力ができます
*
*/
class Motor{
public:
Motor(PinName plus,PinName minus,int period,int id);
~Motor();
void setLimit(double max,double min);
void setPWM(double pwm);
double get_ID();
private:
PwmOut *Plus;
PwmOut *Minus;
double Max;
double Min;
double Pwm;
int ID;
};
#endif