If someone could help me write up an example piece of code that I can dissect and learn from i'd be extremely grateful.
What I would like to happen
The arcade button to be inactive until 50 cents is received by a user with a max of $1.00. 50 cents would equal 1 arcade button press with $1.00 equaling 2 arcade button presses. When currency is received the buttons Led would then turn on the Lcd back-light would change color from red to green letting the user know its ready for a button press while updating the LCD with that info. When the button is pressed it will activate an output on the arduino EX: Pin 7. once program is done button led will turn off and wait for more currency. I'd also like to add 1 override button if possible to test the system before putting it out in the field.
While this is happening id like it to update the lcd with info regarding the program. for example,
Shooting Gallery
Please insert coins. $0.00
Shooting Gallery
Max Coins Already Inserted.
Shooting Gallery
Shots = 2 $1.00
Fire When Ready
Shooting Gallery
Shots = 1 $0.50
Fire When Ready
Shoot Gallery
Override active
Have Fun!
I plan on doing a small write-up on the project as soon as I get things figured out. If you need more info or have suggestions i'm an open book.
The arcade button to be inactive until 50 cents is received by a user with a max of $1.00.
No, the switch will not become active or become inactive. It will always be active. The action that happens depends on what action(s) (like depositing coins) have happened already when the switch is found to have become pressed.
When currency is received the buttons Led would then turn on the Lcd back-light would change color from red to green letting the user know its ready for a button press
That is a completely different requirement.
It would be difficult for anyone else to write code for you, not knowing how the switch is wired, where it is connected, what kind of LCD you have, how it is connected, what kind of coin acceptor you have, how it is connected, and what energizing a pin is supposed to accomplish.