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
00001 #ifndef MOTOR_ 00002 #define MOTOR_ 00003 00004 #include <mbed.h> 00005 00006 #if 0 00007 ~example~ 00008 Motor name(ピン名1,ピン名2)でこのクラスを使うことができるようになる 00009 name.revolution(pwmの値)でモータを回すことができる 00010 name.reset()でモータの値を0にする 00011 #endif 00012 00013 class Motor 00014 { 00015 public: 00016 Motor(PinName pin_a,PinName pin_b); 00017 void revolution(double); 00018 void reset(); 00019 private: 00020 PwmOut motor1; 00021 PwmOut motor2; 00022 }; 00023 00024 #endif
Generated on Sat Oct 8 2022 11:15:36 by
1.7.2