STM32 door lock password problem

cwl6985839cwl 注册会员
2023-02-25 20:16

the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > there may be many reasons lead to enter the password correctly show password mistake. Here are some common possible causes:

  1. Hardware connection problem: Confirm that the hardware connection of the development board is correct, including the input key connection of the password lock is correct.
  2. Software logic problem: Check whether the logic in the program is correct, such as whether the variable is correctly assigned, whether the logical operation is correct, etc.
  3. Coding problem: Confirm that there is no coding error in the code, such as character encoding mismatch.
  4. Input problem: Check whether the password is correct, for example, whether the length of the password is correct or whether the password is the same as the initial password.

It is recommended that you check the above aspects one by one to determine the problem, and then proceed with the corresponding solution. If you can't determine the problem, you can try debugging your program to see what the problem is.

heizu2012 注册会员
2023-02-25 20:16

The answer part of the reference to GPT, GPT_Pro better solution to the problem
STM32 code lock is a kind of security control for a lock, Usually, this kind of lock is controlled by a string of numbers(password) entered by the user. In actual use, if the correct input code is displayed but the correct password is displayed, it is likely that there is something wrong with the password setting, or it is caused by the failure of initialization.

First of all, we can check whether the code is wrong, such as the initialization function is written wrong or the code has a bug, of course, we can also check whether the pin used is properly connected, whether there is a break in the pin or whether there is debris on the pin. If none of these are the cause, try reburning the code and see if you can fix the problem.

Alternatively, you can try to reset the password, for example, to 111111 before initializing the password. It is also possible to reset the password because sometimes the password may change after an initialization failure or after a power-on.

Finally, you can also try using the serial assistant to look at the STM32's real-time data and compare it with the code so that you can find the problem.

// 这里是重新设定密码的代码
// 将密码重新设定为111111
char password[]="111111"; 
// 将密码传递到宣码锁上 
// 重新进行初始化操作 

If the answer is helpful, please accept it.

About the Author

Question Info

Publish Time
2023-02-25 20:16
Update Time
2023-02-25 20:16

Related Question

执行命令rm -rf /tmp/images sudo=True sudo_password=password is not working

谭伟伟 stm32 tcp连接阿里云ota升级问题







mac idea报错:TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit