Hello. I Am a Beginner to intermediate programmer.
I am trying to build an alarm with a door sensor using a Raspberry Pi and Python 3. I have connected everything that I need, (2 LED's (Green for alarm active and Red for alarm sounding); A buzzer and the Resistors) but what I want is so that one of the LED's is on all the time. When the door is opened there will be a requirement to type in the code through the keyboard connected via USB and if the code is typed correctly then the alarm will deactivate, but if after 10 seconds the code is not entered or that if the code is typed incorrectly the buzzer will go and the Red LED will light up and the Green LED will power off.
The only problem is is that I do not know how to make the part of the script so that the code has to be entered. Is there anyone that could help with the code?
Thank you in advance.




