This is a demonstration program which draws a keypad on the LCD and uses the touch screen to allow an operator to key-in an access code. Two possible codes are allowed to grant to different levels of access. Additionally the push button is used to allow an operator to send Moorse Code pulses in to the device which is checked against two characters to determine if there was a match, and if so, access is granted.

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI mbed-os BSP_DISCO_F429ZI

Also draws a mushroom on the screen and animates it.

Revision:
5:5c507689ae66
Parent:
3:0e554d8d5a19
--- a/SecurityUnlockDemo-Main.cpp	Tue Jun 04 22:51:25 2019 +0000
+++ b/SecurityUnlockDemo-Main.cpp	Wed Jun 05 02:27:51 2019 +0000
@@ -94,7 +94,7 @@
 // granted.
 //
 // ----------------------------------------------------------------------
-void MainGrantAccess(uint8_t u8_thisAccessLevel)
+void MainGrantAccess(uint8_t u8_accessLevel)
 {
     uint8_t au8_reportString[21] = { 0 };
     
@@ -102,7 +102,7 @@
     st_lcd.Clear(LCD_COLOR_WHITE);
     
     // Build a report to offer    
-    (void)sprintf((char *)au8_reportString, "Level %u", u8_thisAccessLevel);
+    (void)sprintf((char *)au8_reportString, "Level %u", u8_accessLevel);
     
     // Display the level of access that was granted
     st_lcd.DisplayStringAt(1, LINE(1), (uint8_t *)"Access granted", CENTER_MODE);
@@ -113,7 +113,7 @@
     AnimationPerformAnimation(u32_randomSeeder);
     
     // Flag the fact that we have granted access already
-    uint8_t u8_accessLevelGranted = u8_thisAccessLevel;
+    u8_thisAccessLevel = u8_accessLevel;
 }
 
 // ----------------------------------------------------------------------