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:
- 0:72680658bf08
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Dec 30 18:17:12 2014 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "Servo.h"
+
+Servo myServo(PB_9);
+DigitalIn button(USER_BUTTON);
+
+
+int main(){
+ myServo.calibrate(0.0005,45.0);
+
+ while(1){
+ //While we press the user button, the servo turn right
+ if(!button){
+ myServo.write(0.5);
+ }
+ }
+}
+
+
+