Hello everyone! I am new to the forum but I have a question that some of you may be able to answer.
I recently installed a keyless entry/central locking module in my car and it works great but there is no function to make the lights flash when I lock and unlock the car. I am trying to use an Arduino UNO to make the lights flash once when I press the lock button on the key fob and flash twice when I press the unlock button on the key fob. I want the code to run once per button push regardless the interval of time the input pin receives the signal for and then return to waiting for another input.
The problem I am having with my program is that it will begin making the lights flash without any input going to the input pins. Any help is appreciated! Thank you.
At this point I would guess that your inputs are floating. You could try using INPUT_PULLUP instead of INPUT in the pinMode() calls. But until you post those links and schematic, that's just a guess.
I just want either "lockprocedure" or "unlockprocedure" to run when either the "lock" pin or "unlock" pin receives a HIGH regardless of the amount of time that it receives the signal for. What is happening is that "lockprocedure" and "unlockprocedure" continually run without an input into either "lock" pin or "unlock" pin.
I know how it should be wired, but I am just unsure about how to do the coding.
Nothing you added to your code has prevented the inputs from floating. The pull-down resistor will have done that. With no schematic, this thread is not going to help any other beginners in future.