I am very new to Arduino and have started to work through the examples in the Project book of the Starter kit.
I have reach project 12 however I am facing a strange situation that I wasn't able to find a solution for on the forums.
I am able to execute all of the lines of code (that is unlock, lock, knock 3 times and unlock again). However, after line 52 servo motor tends to stay in the unlocked position and won't allow me to lock again. Even when I try to press the push button to make the servo motor go into a lock ed position, it would not respond.
I tried to run a similar code that I found on the forums and the circuit works fine. However when I run my code, I am getting an error.
I believe that I wrote the exact same code as what is put out there but for some reason I am getting a glitch in my program. I have tried to compare both my program and the forum's line by line and haven't been able to find any discrepancy. I was hoping someone can have a look at my program and maybe identify something that I am not seeing.
I changed the expression "locked == false" to "locked = false" and it works now. Sorry for the late reply. I didn't know I got a reply for my post until just now. I assumed that would get a notification or sometime. Like I said, I am very new to this. Thanks again.