Every arcade seems to have one particular game that appeals to the gamblers among us: the horse race game. That game has several model horses and people can gamble on the outcome of their race. The results are either random or controlled by the players through some sort of input mechanism. In a new video, element14’s Lorraine Underwood explains how to recreate that game with an Arduino — but powered by people.
The game concept is similar to the horse race arcade game, except players run to influence the success of their respective racers. Those racers are little 2D people figures instead of horses. Everyone can run on their own schedule. Then, once everyone completes their run, the game shows the results by moving the figures across the track. This links to Strava, which is an app for tracking runs using popular devices like smartphones and smartwatches. Each player just has to complete a run as part of the group that Underwood set up for this purpose.
Because the game needs to pull run information from Strava’s API over the internet, Underwood chose to use an Arduino UNO WiFi Rev2 board. It controls the movement of each figure using a micro DC gearmotor with a belt. Those motors came from DFRobot and include encoders, which are helpful for ensuring the movement is exact. The game supports four players, so Underwood added a DFRobot quad DC motor shield to the Arduino to drive the motors.
The Arduino sketch connects to the local WiFi, then pulls the distance covered by each runner from the Strava API. It then scales that down to the distance of the game track and spins the motors until each figure reaches the corresponding distance.
The post Build your own human horse race arcade game using Arduino and Strava appeared first on Arduino Blog.