Horse race game

Is it possible to make this game?
Horse racing with four horses, cars, et al

Races on a circular track like a horse race track.
Each horse moves based on a randomly generated number of spaces 1,2,3
Movement equals: 1 space is 2", 2 =2.5" , and a 3 = 2.75"
Movement occurs when a momentary switch is pushed. The horse moves 1,2, or 3.

I'm going to use a small bike chain
Then coding it. Would I use a bunch of the Nanos for each horse individually or a single Uno?

I'm just learning Arduino and have created a few things but they took forever (sometimes) to get working and I'd love to make this for the classroom (I teach Middle School history) kids. It doesn't have to be horses. It can be flying pigs miniatures

a class for a horse.
one object for each horse.
one Uno for a lot of horses.

1 Like

What sort of motors / drivers are you planning?

Bunch vs single: the Uno and the Nano use the same processor so if you want to go for one, why go for am Uno? Added benefit of the Nano is the two additional inputs (analogue only).

I think the Uno is too much. Nanos are affordable for multiple horses. The Nanos are the same as an Uno from what I'm learning, just smaller with the extra analog pin.

As for motors, I'm thinking about those smaller motors with a large gear ratio to control speed. The armature would be pointed down or up to separate the chain drives. Six horses, six drive chains, and six Nanos each able to run random movements of one, two, or three. That's how I imagine it. That way it's completely randomized and never the same winner. I'm just not a programmer (though I'm teaching myself).

A typical beginners response is to use more than one processor, when 95% of the time it is not needed. Like here one Nano, or Arduino Uno is all you need, in terms of processors.

You considered an Uno to combine everything; there is no need, you can use a single Nano to combine everything.

Can it run all of the different horses?

You will find out when you start wiring and programming. If not, find the reason why you can't achieve what you want and take it from there.

But the requirements sound like it can be done with a single Nano. If you only want to move the chains one-way, you need a pin per chain. You will also need a pin for the button for each chain to set the speed.

Memory wise, it should easily fir.

I haven't got a clue. I'm trying to figure it all out now. I'm open to suggestions.

As long as the Nano can make six horses move, it sounds great. The horses go forward from the start line to when the first horse triggers the finish line for their lane and the rest stop. The horses are reset after pushing a button and they move forward until they reach the starting line for their horse. That's my vision.

Controlling each horse's forward movement with a single Nano or Uno is the challenge. Making the chain advance one, two, or three segments (chain links) at random is the key. Then it's all mechanical engineering from there.

6 buttons to set the speed, 6 pins to drive a motor.

Have you thought how are you going to align the horses at the start line?
Do you need to detect which horse is the first to go over a finish line?

I would have thought so. If you run out of physical pins then you simply add some form of pin expanders. The simplest being a shift register or a port expander chip like a MCP23S17 which will give you another 16 inputs / outputs.

I would imagine that you would need a sensor at each stopping point along the way, or use a sensor at the start and use a stepping motor to move the horse and exact distance.

Not sure of the mechanics here , but all the horse race arcade games I have seen, have the horses go backwards back to the start once a race is over.

I was thinking of a bike chain. I guess going backward works as well. When you say "pin" extender what pins are you referring to? I'm thinking you mean pins on the board. I didn't know I could add more.

Stagger them at the beginning so they all have the same distance at the finish line.

Yes, in effect they are more pins that your code can access.

Precisely that is why beginners think they have to have more than one Arduino, or an expensive board with lots of pins on to do a project.

Search for:-
More Pins Arduino
For lots of tutorials and videos. Although most videos are long and drawn out with a low information content.

1 Like

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