Error in my code help

While not looking at what’s happening, I suspect the delays are blocking your code from doing anything meaningful.

This is probably one of those rare cases, where I’d suggest using interrupts to detect when your balls drop.

Overall, you may find other benefits in millis() timing.

1 Like