Password locks are relatively common in life. There are various types of locks. The most common ones are in the form of numbers. Generally, you need to enter a few numbers to complete the password. This project uses color to complete the password lock. There are many types of colors, which are more complicated than numbers. Using color cards to set the password and unlock the lock is more difficult to crack, and it is relatively safer.
The project directly uses the development board flying lines to complete functional testing.
After the system is powered on, set the password first, and press the button to start setting the password. When the GY-31 light is on, it means that the color data is being read. If it goes off, it means that the data reading is completed. You can replace the next color card. The interval is 1 second, which is enough to change the color card. After the 4 reads are completed, the 4 color value data read are saved.
If the password already exists, press and hold the button for 3 seconds to enter the password setting state.
When unlocking, first press the button to start reading the color card, and read it 4 times in sequence. When the light of GY-31 is on, it means that the color data is being read. When it is off, it means that the data reading is completed and the next color card can be replaced. , the reading interval is 1 second. After the reading is completed, compare it with the stored color card color value. If the data is the same, the unlock indicator LED1 will light up and the OLED screen will prompt success. If the data comparison is wrong, the LED will not light up and the OLED screen will prompt an error.
Blockdiagram
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet