The Arduino Controller

This is a car game created through Scratch for Arduino (S4A), a modified version of the Scratch software that can take in direct input from an Arduino sensor. The user is required to control two sensors to move a car around a track. A potentiometer is connected to a 3D printed steering wheel while a pressure sensor is connected to a foam pedal. Running off the road results in a fail and a reset.


Arduino-Scratch Game Controller

Materials Used

Arduino and breadboard mini, wires, resistor, 3D printer for box container and wheel, guitar hero pedal, and two sensors:
Potentiometer, Pressure sensor:
external image mp10pp2.jpgexternal image 08685-03-L.jpg


We used two different sensors as input for our Demo race car game. The potentiometer controls the steering of a small car in the demo app. The pressure sensor controls the forward movement. After connecting the two sensors to the arduino and breadboard we moved to the S4A application to create the Demo race game. Once we had confirmed all features were functional we moved to the 3D printer to create the car hardware.


photo 2.JPG
Inside the box is the ardruino

We had to create a steering wheel using and the 3D printer makerbot replicator in order to use the potentiometer. We then created a housing for the arduino and other hardware pieces to keep the steering wheel stable while the user twists the potentiometer.

Finalized setup with steering wheel and pedal
The pedal is connected via wires to the pressure sensor and the wires extend through the holes in the box.

Screen Shot 2012-11-03 at 2.02.37 AM.png
Screen Shot 2012-11-03 at 2.08.14 AM.png

This diagram illustrates the connections from the Arduino through the breadboard of the Arduino Controller.

This image is a basic schematic of the setup on the Arduino.

The Game


Before receiving any data from the Arduino, we first needed to upload the S4A firmware to the Arduino. With the S4A software we created a simple game with a tutorial level and two playing levels. These keep the game interesting and challenging while also fun! The controls are challenging to use to control a car in a game where the view is not in the first person, however this may add some excitement to the game as an added challenge not inherently understood.


Some challenges we faced included finding a way to create a demo racing game that would take in Serial information or readings directly from the Arduino. Once we discovered S4A it was easy to find the Arduino sensor readings and use them in the program. Another challenge we faced was getting the 3D printer to print out correctly. As we are working with larger prints it was difficult to keep all parts of the base on the platform without curling. We have not found a way to keep one corner from curling. Another problem we faced was the minimum width that the 3D printer could print. This resulted in some features of the print coming apart easier than others. One final challenge we encountered was fitting all the hardware inside the box and keeping the box closed. First we had to find a mini breadboard because the one we were originally given was slightly larger than the Arduino and did not fit into the box. The wires we were using were thick and did not seem to want to stay inside the box without popping out of their pin slots. We solved this with smaller and shorter wires.

Video Presentation

The Arduino Controller from Leyla Norooz on Vimeo.

The Arduino Controller from Leyla Norooz on Vimeo.

Future Work

In the future it would be interesting to readjust how we take in the Arduino readings to be able to control any racing game this way. including flash games online and downloaded PC games. It would also be interesting to further develop this demo game to be used with the controller. Because the Arduino is a relatively simple device that can be easily modified, this controller could be put together as a kit to help teach input, output, and simple circuitry.


Fork us


Check it out!


Scratch for Arduino
Car Game
3D Arduino Box
3D Wheel
Guitar hero foot pedal - as itself

Video Music - Tron legacy soundtrack, the grid, end of line
Arduino Uno picture from video