Presentation code for PROJECT #1 - ES200 Fall 2014

Dependencies:   Servo mbed Motor

Files at this revision

API Documentation at this revision

Comitter:
tsevcik08
Date:
Thu Oct 16 18:56:58 2014 +0000
Parent:
2:f10d71467f13
Child:
4:0ed46a6cdf66
Commit message:
new code without arm code

Changed in this revision

ARM/armmain.cpp Show diff for this revision Revisions of this file
Servo.lib Show diff for this revision Revisions of this file
--- a/ARM/armmain.cpp	Thu Oct 09 19:16:54 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-//Code for the arm servo
-//Created 09 OCT 14, 3/C Stabler
-#include "mbed.h"
-#include "Servo.h"
-
-Servo arm(p21);
-DigitalIn switch1(p16);
-DigitalIn switch2(p17);
-
-int main(){
-    
-    float armpos;
-    int sw1;
-    int sw2;
-    
-    while(1){
-        sw1 = switch1.read();
-        sw2 = switch2.read();
-        
-        if(sw1 == 1)
-        {
-            for(armpos = 0.0; armpos <= 1.0; armpos += .05){
-                arm = armpos;
-                wait(.1);
-            }
-        }
-        else if(sw1 == 0)
-        {
-            arm = armpos;
-        }
-        else if(sw2 == 1)
-        {
-            for(armpos = 0.0; armpos >= 0.0; armpos -= .05){
-                arm = armpos;
-                wait(.1);
-            }
-        }
-        else if(sw2 == 0)
-        {
-            arm = armpos;
-        }
-   }
-}     
\ No newline at end of file
--- a/Servo.lib	Thu Oct 09 19:16:54 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://developer.mbed.org/users/cstab94/code/Servo/#3bd6bf9fbd41