kh

Dependencies:   mbed PinDetect Servo

Revision:
0:28e05e1a3d1e
Child:
1:2c365f6da61d
diff -r 000000000000 -r 28e05e1a3d1e setup.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.cpp	Sat Nov 10 19:30:54 2018 +0000
@@ -0,0 +1,34 @@
+/*
+* Authors: Group 4 Adam Elghor, Brian Kaplan, Sayak Chatterjee, Moraa Onwonga
+* Purpose: Controls the SETUP state of the machine
+* Language: C
+*/
+#include "setup.h"
+#include "authentication.h"
+#include "parameters.h"
+#include "actuators.h"
+
+/*
+* Function:  setup
+* --------------------
+*  Calls the functions needed to setup the entry sequence for the safe.
+*
+*  returns: the next state in the state machine
+*  LOCK: after entry sequence has been entered
+*
+*/
+
+
+enum states setup() {
+	if(pb) {
+	setEntrySequence();
+	wait(5000);
+	lockSafe();
+	wait(5000);
+	return LOCK;
+	}
+	return SETUP;
+}
+
+
+