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.
Diff: main.cpp
- Revision:
- 3:198ec91cec19
- Parent:
- 2:812701011676
- Child:
- 6:8364e8639b4e
--- a/main.cpp Sat Oct 11 08:52:35 2014 +0000 +++ b/main.cpp Tue Oct 14 10:31:20 2014 +0000 @@ -1,19 +1,20 @@ #include "mbed.h" -//#include "ExtendedServo.h" #include "DelayServo.h" DigitalOut myled(LED1); int main() { - //PwmServo a(PB_8); - //ExtendedServo b(PB_10, 170, 5, 90, false); - DelayServo b(PB_10, 10, 10000, 170, 5, 90, false);//10度刻みで50ms毎に角度を更新 + DelayServo b(PB_10, 10, 10000, 170, 0, 0, false);//10度刻みで50ms毎に角度を更新 + //DelayServo b(PB_10); while(1) { - b.setAngle(-90); + + b.updateInterval(30); + + b.setAngle(0); wait_ms(2000); - b.setAngle(90); + b.setAngle(180); wait_ms(2000); } }