Finish line controller, alarm bell and spinning lights

I hope to get some help on a finish line circuit i'm trying to build for a R/C track.
The general idea is that there are 2 lanes, one for each car. At the end of each lane will be a lever-switch, the first car to trigger their lane's switch will activate a spinner light for that lane and ring a alarm bell signaling the end of the race.

i have...
1 - Arduino Nano
3 - relay modules (one for each light and one for the bell)
1 - breadboard power supply
1 - breadboard
2 - 3-pin lever switches (set up for continuity when the lever is depressed)

I need help in properly setting up the circuit and writing the code.

The first car to trigger its switch will set off its light for 5 seconds and the bell for 3 seconds. It will also need to be setup to ignore the other switch's input so only one lane can be the winner.

Looking for any help i can get.

Here is the first challenge for you. How will you determine that one switch will not always operate before the other switch? Just how they may be made.
Second, a better design will be to test for when the switch becomes OPEN, with one side grounded to a common ground. Otherwise you will have to contend with bouncing contacts.
Good luck,

Hi Paul, thank you for helping.

I was thinking i could just use a 5v INPUT_PULLUP to a pin on the NANO to trigger the relays.
There is a very similar project used for a hot-wheels track but they use IR LED as finish line triggers where I was hoping to use lever switches.
The hot-wheels project is linked below.

IR makes more sense.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.