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.
Revision 0:fbe913f85d70, committed 2014-10-15
- Comitter:
- alphasig
- Date:
- Wed Oct 15 19:19:40 2014 +0000
- Commit message:
- actual code
Changed in this revision
diff -r 000000000000 -r fbe913f85d70 Servo.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Servo.lib Wed Oct 15 19:19:40 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/Servo/#36b69a7ced07
diff -r 000000000000 -r fbe913f85d70 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Wed Oct 15 19:19:40 2014 +0000
@@ -0,0 +1,37 @@
+#include "mbed.h"
+#include "Servo.h"
+
+Servo myservo1(p21);
+Servo myservo2(p22);
+
+
+DigitalIn sw1(p16);
+DigitalIn sw2(p17);
+DigitalIn sw3(p18);
+DigitalIn sw4(p19);
+
+int switch1=sw1;
+int switch2=sw2;
+int switch3=sw3;
+int switch4=sw4;
+
+int main() {
+
+ float servopos;
+
+ while (switch1==1)
+ {
+ while (servopos <=.6)
+ {
+ myservo1= servopos;
+ servopos=servopos +.005;
+ wait(.01);
+ }
+ while (servopos >=.3)
+ {
+ myservo1=servopos;
+ servopos=servopos-.005;
+ wait(.01);
+ }
+ }
+ }
diff -r 000000000000 -r fbe913f85d70 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Oct 15 19:19:40 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1 \ No newline at end of file