Hey, I've made a Pinball Machine and have programmed it with LeJOS. The program is quite simple (250 lines, few listeners) but it's all I needed.
Pinball Machine uses one NXT Brick, 4 touch sensors (3 of them are attached to one port) and 2 light sensors. After pressing orange button the ball is given and a new game is started. Every game has three balls total. If the ball is lost within 10 seconds after start, the ball is returned without losing one.
- losing ball after 10 seconds - 50 points
- hitting both Red and Green Bumpers - 100 points
- hitting one of the Yellow Bumpers - 200 points
- getting ball to the Black Hole - 300 points
Black Hole opens up every 500 points, then player has 20 second to get the ball into it. If 5 seconds is left Black Hole's light starts flashing.
If you like this pinball machine you can check my other projects on youtube or in the gallery.