We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi there, I am currently working on a secret touch detecting door lock project which allows the user to enter when the right touch sequence is key in. However if a wrong touch sequence is key in, it will trigger the webcam to take a picture of the person. I have written most of the main code in using Arduino but in order to utilize my laptop webcam to take a picture i have to go through processing.The problem I am having right now is that each time when someone key in the wrong touch sequence the webcam will take picture all the time(like every single second) until I close the processing sketch. So instead of taking picture of the person who key in the wrong touch, I end up with a picture of the last person who closes the processing sketch. I am not very good with programming, could someone please give me some guidelines or tell me why is the program behaving in this manner and if possible give me some solutions to it. I have attached the processing sketch codes in this discussion. By the way sorry if you cant understand what I am trying to say as my English is not very good.
Answers
Better paste code in the message, rather than showing an image which cannot be searched, copy / pasted, etc. See also To newcomers in this forum: read attentively these instructions.
First you can try is to reset serial to null after you have captured the image. Also put the image() and saveFrame() calls inside the cam.available() test.