Hi All.
I have built a virtual bingo machine, it is like a pinball flipper machine but instead of scoring points the bingo machines have 25 holes, I did not write the sketch, as I have never used an arduino before, I did the mechanics, and my friend, James, did the programming.
I posted this question in 2016, and shortly afterwards, I put the bingo machine into storage in 2017, I have now retired and I have the time to try and fix an issue.
Usually you get one machine, one game, but a man named Joop has written software to be able to run an emulator on a computer, and I have used the base cabinet (the bottom with the 25 holes or the base with the flippers) as the mechanical side, so you have one base unit, and it was10 different machines, it is now 80 machines.
I have a ball gate sensor which is a pair of leaf switches on a hinge, one side goes to a mega2650 and the other goes to ground, as the ball leaves the shooting lane and passes through the gate it closes the contacts, and should lift a ball into the ball runway.
I also have a ball return leaf switch, which when the ball goes down the ball return hole, it closes the contacts and lifts a ball into the ball runway, the ball return works perfectly.
I then switched the wiring over for the ball return onto the gate switch, and it worked, so that proves the gate switch works, the only trouble with it is that it gives more than the set amount of balls.
When I added the routine, I was given for the, ball thro gate, the sketch does not run properly, and the ball thro the gate does nothing.
My question is can someone, please, look at the sketch and see if there is a reason for it not working.
This is the routine I was given to include in the sketch for the ball thro gate.
// Check for ball thro gate
sensorvalue = digitalRead(A0);
if (sensorvalue == LOW)
{
Serial.print ("z");
delay(2000);
}
Cheers.
Ian.