Thank you guys for the input. Wow, you guys are fast!
How are the switches (to be) wired to the Arduino? Since you are not using the internal pullup resistors, you'll need external resistors. Using the internal ones is so much easier.
50 milliseconds is a loooong time for a switch to bounce. 10 milliseconds is usually long enough for bouncing to die out.
In most of the cases, there will be TTL AND or NAND gates between the switches and the Arduino. But not in the case of the All Drop Targets Down Switch, my guess is that if it makes any difference at all, I'd go for pulling the switch up towards the Arduino's 5 volt level, rather than the pinball game's.
Changed the debounce delay to 10 ms. Thanks. The other delays will most likely be subject to change, too. I just have to hear it to know if it produces the right "feel".
In the long run you have no chance at all of getting code like this to work as it uses delay(). Look at the "blink without delay" example , and then look at FSM's (Finite State Machines) in the playground.
Mark
I will look at it, right after I've finished writing this post. I think I've already forseen that "blink without delay" issue if I got it right, I'm not sure.
I think there's no chance of using only one Adrino for all the tasks, even if the ports and the memory are sufficient. So this unit will handle three of the four instances where there just have to be delays. (The forth is the two Bumpers, but I will use a dual copy of Gottlieb's System 80 Bumper Driver board there, and the switch signal for 100 points score will go to the other Arduino unit, the one without or with very short delays.)
This one will only control the two pits and the drop target bank. While it works with its delays, the ball will hit the slingshots and other targets That would have posed big troubles if the same unit was supposed to take care of those signals, too. But they will not be sent to this busy unit. And while the ball is in one of the two pits, of course no other inputs are made from the rest of the playfield. (Sorry, my English skills is not 100%, so sometimes I need ten words to express something that should take two words...)
I should also have pointer you at the use of shift registers (and other chips) the extend the number of I/O ports you have.
Mark
Shift registers are currently beyond my knowledge. I think I got the idea in general, but no details.
Don't know if I have the brain capacity to figure that out. But for now, I think the I/O ports of the Uno will be sufficient for this part of the project.