156
edits
Lydiakluge (talk | contribs) |
Lydiakluge (talk | contribs) |
||
Line 6: | Line 6: | ||
Arduino and two potentiometers to build one myself. | Arduino and two potentiometers to build one myself. | ||
[[File:Pong-console-arduino-potentiometer.jpg|800px]] | |||
That's the finished setup. | |||
'''Pong''' | |||
The final Processing sketch is based on a program I wrote during the class "Tangible Programming - An Introduction" held by Johannes Deich. I went for a more colourful look than the original game. | |||
[[File:Pong-processing.jpg|800px]] | |||
I used the serial and the Arduino (Firmata) library to import data from the Arduino, which runs the "StandartFirmata"-sketch, to Processing. In short, the first potentiometer is attached to the analogue pin 0 and its data moves the left paddle, while the second potentiometer is attached to the analogue pin 1 and moves the right paddle. Self-evidently, I mapped the value range of the potentiometers to match the height of the canvas. | |||
If you are interested, feel free to download the [[Media:Pong.zip|Processing sketch]] and have a closer look. | |||
'''Prototype''' | |||
This full-functioning prototype already shows the unfussy electronic setup as it is in the final console. | |||
[[File:Pong-console-arduino-potentiometer-prototype.jpg|800px]] | [[File:Pong-console-arduino-potentiometer-prototype.jpg|800px]] | ||
[[File:Pong-console-arduino-potentiometer-prototype-close.jpg| | |||
[[File:Pong-console-arduino-potentiometer-prototype-close.jpg|357px]] | |||
[[File:Pong-console-arduino-potentiometer-breadboard.jpg|357px]] | |||
'''Final Console''' | |||
The finished console is made of plywood and has one rotary button attached to each potentiometer, enabling the user to control the paddles by rotating movement; just like with the original consoles. The wires and electronic components are all hidden on the inside. | |||
[[File:Pong-console-arduino-potentiometer-player.jpg|800px]] | [[File:Pong-console-arduino-potentiometer-player.jpg|800px]] | ||
Line 17: | Line 41: | ||
'''Video''' | '''Video''' | ||
Feel free to watch a video of me doing a test run. | |||
<videoflash>g0C0RPArRzo|800|450</videoflash> | <videoflash>g0C0RPArRzo|800|450</videoflash> |
edits