Pseudo Code

Dependencies:   mbed Motor Servo

Revision:
1:d90f940d6ed2
Parent:
0:3c51dfd71129
Child:
2:b4a690fadc9b
--- a/main.cpp	Tue Oct 09 14:32:44 2018 +0000
+++ b/main.cpp	Tue Oct 09 14:36:47 2018 +0000
@@ -1,7 +1,13 @@
-#include "mbed.h"
+/*Project 2 – Mechatronics – MIDN Dietrich, Schwind, Silver*/
 
-/*Project 2 – Mechatronics – MIDN Dietrich, Schwind, Silver*/
-/*Hardware
+//Libraries
+#include "mbed.h"
+#include "stdio.h"
+#include "stdlib.h"
+
+/*
+Declare servos, motors, and switches
+Hardware:
 Servo 1 – rotates hand between palm facing up and palm facing in
 Servo 2 – inside jar to burst pb out
 Motor – drive arm from 90 degrees to forehead
@@ -9,8 +15,11 @@
 Switch 2 – on forehead (turn motor off)
 Switch 3 – on lid? (when you put the contents back in the jar it signals arm to start moving back down to starting position?)
 Switch 4 – on (desk?) to signal the motor to stop when arm reaches starting position
- 
-//Software
+*/
+
+int main() {
+/*
+Software:
 Hand starts with palm facing in
 Jar into hand
 Hits switch that turns servo on to turn the hand to position where palm is facing up
@@ -19,7 +28,7 @@
 Random number (Russian roulette) if the jar will open or not
             Rand_Max / (int) random //random integer 0 or 1
 /*This next section depends on if the random number is 0 or 1*/
-If open (read 1):
+/*If open (read 1):
 When switch is hit to turn motor off? Servo inside jar turns on to break the lid and make pb fall out
 Speaker will go off saying “beat Army”
 When user puts contents back in the jar and lid on, hits a switch (when lid goes back on?) that turns the motor on to return the arm to the original position
@@ -29,10 +38,5 @@
             Servo inside pb jar will not turn on
             Speaker will say “boo”
 --switch will not be hit when lid goes back (since it never came off) so will the user have to manually move the arm back to the starting position? Will they press the button on the lid so the motor turns on?
-
-
-
-int main() {
-
-    }
+*/
 }