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.
Dependencies: Motor Servo mbed
Revision 0:18862eeb0ae8, committed 2015-10-13
- Comitter:
- chadlewellyn
- Date:
- Tue Oct 13 13:58:01 2015 +0000
- Commit message:
- part 3
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Motor.lib Tue Oct 13 13:58:01 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/Motor/#f265e441bcd9
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Servo.lib Tue Oct 13 13:58:01 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/simon/code/Servo/#36b69a7ced07
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Oct 13 13:58:01 2015 +0000
@@ -0,0 +1,42 @@
+#include "mbed.h"
+#include "Motor.h"
+#include "Servo.h"
+
+
+int main() {
+
+float i;
+Servo myservo1(p21);
+myservo1 = 0;
+myservo1.calibrate(0.0009, 90);
+Servo myservo2(p22);
+myservo2 = 0;
+myservo2.calibrate(0.0009, 90);
+
+while(1) {
+for (i = 0; i <= 1.0; i+=0.01) {
+ myservo1 = i;
+ myservo2 = 1.0 - i;
+ wait(.05);
+ }
+for (i = 1.0; i >= 0; i-=0.01) {
+ myservo1 = i;
+ myservo2 = 1.0 - i;
+ wait(.05);
+ }
+
+Motor m(p25, p27, p28);
+float s, n;
+
+for (s = 0.2; s <= 1.0; += 0.1) {
+ n = -s;
+ m.speed(s);
+ wait(5);
+ m.speed(n);
+ wait(5);
+ }
+
+}
+
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Oct 13 13:58:01 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/34e6b704fe68 \ No newline at end of file