kh

Dependencies:   mbed PinDetect Servo

Revision:
3:2f7a7e2cd49e
Parent:
2:04bbd14722bd
diff -r 04bbd14722bd -r 2f7a7e2cd49e authentication.cpp
--- a/authentication.cpp	Mon Nov 12 23:36:11 2018 +0000
+++ b/authentication.cpp	Tue Nov 13 03:19:06 2018 +0000
@@ -18,14 +18,15 @@
 int entryNum4;
 
 
-AnalogIn pot1(p18);
-AnalogIn pot2(p18);
-AnalogIn pot3(p20);
-AnalogIn pot4(p20);
+AnalogIn pot1(p15);
+AnalogIn pot2(p16);
+AnalogIn pot3(p18);
+AnalogIn pot4(p19);
 
 bool bluetoothCode = false;
 bool bluetoothSetup = false;
 Serial blue(p28,p27);
+Serial pc(USBTX, USBRX);
 
 /*
 * Function: setEntrySequence
@@ -33,10 +34,10 @@
 *  Reads in user's entry sequence attempt
 */
 void setEntrySequenceAttempt() {
-	entryNum1 = float(pot1) * 10;
-	entryNum2 = float(pot2) * 10;
-	entryNum3 = float(pot3) * 10;
-	entryNum4 = float(pot4) * 10;
+	entryNum1 = float(pot1) * 6;
+	entryNum2 = float(pot2) * 6;
+	entryNum3 = float(pot3) * 6;
+	entryNum4 = float(pot4) * 6;
 }
 
 /*
@@ -61,6 +62,11 @@
 	return (checkPot(p1,entryNum1) && checkPot(p2,entryNum2) && checkPot(p3,entryNum3) && checkPot(p3,entryNum3));
 }
 
+void printPotValues() {
+	pc.printf("pot1 is %f", pot1);
+	
+}
+
 bool checkPot(int p1, int p2) {
 	return (p2 - p1) < 2 && (p1 - p2) > -2;