|Discovering Computer Science||Pong »
In this session, we introduce the DF Robot Input Shield, the Liquidware Extender Shield, and the Adafruit 2.8" LCD Touchscreen and explain how to properly assemble them.
Getting the LCD Touchscreen Working
Adafruit Graphics Library Functions
In session 3, we run through some basic functions included in the Adafruit graphics libraries that will allow us to draw some basic shapes needed for our game of pong.
Input Shield Set up & Learning The Serial Interface
In Session 4, we run through how to properly connect your Input Shield and how to utilize the serial interface to communicate between two Arduino Microcontrollers to create the input needed for a single player game of pong.
Creating The Computer Player
In Session 5, now that you have implemented functionality to move your pong paddle using the analog stick, implement the same redrawing technique to create an A.I. opponent that controls the other paddle.
Creating The Ball Collisions
In session 6, you will create a set of functions that will handle collisions of the paddles and borders as well as a function to handle the ball going out of bounds.
Complete The Pong Single Player Game and Interface
In session 7, you will complete the single player version of pong and create a basic user interface as well as implement score keeping through modifications of functions you already wrote.
Revisiting Your Input Shield Sending/Recieving Code For 2 Player Mode
In session 8, you will go back to the sketches you created for sending/receiving input from the input shield and modify the code to send/receive signals from the up/down push buttons. Once completed, you will implement this new version of your code into your game of pong replacing your old input receiving function.
Modify Your Interface and Code To Allow Single or Two Player Mode
In session 9, you will modify your completed game to integrate both single player and two player modes and adjust your interface accordingly.
The Following Sessions Require a Minimum of Two Weeks To Complete
These Are Mandatory Only For Groups Who Have Finished The Base Project and Have Two Weeks Left
Replacing The Input Shield With An Accelerometer
In session 10, you will be shown how to properly wire the accelerometer using a step down voltage converter. This accelerometer will control the movement of the paddle.
Serial Interface With The Accelerometer
In session 11, you will create two sketches to send and receive input using the accelerometer similar to the sketches written in session 4.
Modifying Your Interface Using The Touchscreen
In session 12, we go over the touchscreen library functions and implement them to modify our interface to navigate without the use of the input shield.
Moving The Paddle With The Accelerometer
In session 13, implement our code from session 11 into the pong game itself and use the accelerometer readings to move our paddle.
|Page last modified on March 27, 2014, visited times|