モータを回すよ
motor.hpp@0:a773f39e5d7a, 2022-02-02 (annotated)
- Committer:
- m2130
- Date:
- Wed Feb 02 11:25:12 2022 +0000
- Revision:
- 0:a773f39e5d7a
moving motors
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
m2130 | 0:a773f39e5d7a | 1 | #ifndef Motor_H |
m2130 | 0:a773f39e5d7a | 2 | #define Motor_H |
m2130 | 0:a773f39e5d7a | 3 | #include "mbed.h" |
m2130 | 0:a773f39e5d7a | 4 | |
m2130 | 0:a773f39e5d7a | 5 | class Motor{ |
m2130 | 0:a773f39e5d7a | 6 | public: |
m2130 | 0:a773f39e5d7a | 7 | Motor(PinName MP, PinName MM); |
m2130 | 0:a773f39e5d7a | 8 | void out(double pwm); |
m2130 | 0:a773f39e5d7a | 9 | private: |
m2130 | 0:a773f39e5d7a | 10 | PwmOut mp; |
m2130 | 0:a773f39e5d7a | 11 | PwmOut mm; |
m2130 | 0:a773f39e5d7a | 12 | }; |
m2130 | 0:a773f39e5d7a | 13 | #endif |