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:8d8f0ea8ebc4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Nov 14 20:50:33 2013 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "Servo.h"
+Servo servo(PTC9);
+Servo servo2(PTC8);
+Serial pc(USBTX, USBRX); // tx, rx
+
+char c;
+int main(void){
+ while(1){
+ c = pc.getc();
+ if(c=='a'){
+ servo.write(1);
+ servo2.write(0);
+ wait(.02);
+ }else if(c=='b'){
+ servo.write(0);
+ servo2.write(0);
+ wait(.02);
+ }
+ }
+}