調整中
Dependencies: mbed HMC6352 US015 TB6612FNG2 getGPS ATP3011
Diff: Rotate/Rotate.h
- Revision:
- 13:38c5ffe5873a
- Parent:
- 10:0433f48faf74
diff -r 0b8b980ba896 -r 38c5ffe5873a Rotate/Rotate.h --- a/Rotate/Rotate.h Wed Oct 27 06:44:30 2021 +0000 +++ b/Rotate/Rotate.h Wed Oct 27 06:47:49 2021 +0000 @@ -4,6 +4,18 @@ #include "MotorDriver.h" #include "mbed.h" -void ROttate(double angle); +void ROttate(double angle){ + // double time = angle; // 試験で調整してください。 + int time = 3; // 試験用のため適当 + if (angle > 0) { + MotorDriver('5', 1); + wait(time); + MotorDriver('1', 0); + } elif (angle < 0) { + MotorDriver('6', 1); + wait(time); + MotorDriver('1', 0); + } +} #endif \ No newline at end of file