PComp Week 7: Project 2 – Game Controller Preliminary Documentation

For the 2nd project, I have decided to create a game controller with corresponding game.  The controller will be spherical with 2 force sense resistors (FSR) and a push button.  The object of the game will be to get a ball into a box.  The FSRs will control the x and y of the ball.  Once the ball is in the box, the ball will shrink and/or disappear as the box will turn red.  The button will bring a new ball into play as well as a new box.  The ball will start in the same location but the new box will be in a different location. 

The controller will have a hard inside with a foam covering and will fit in the palm of the user’s hand.  Below are my preliminary sketches followed by the breadboard set up for the controller:

Proj 2 NotesProj 2 Controller Design 2

Proj 2 Breadboard

It would be great to be able to have different size balls created each time that have to make it into specific boxes in order for box to close off.  This will depend on my coding skills but I am up to the challenge.  If I can add additional features to the controller I would like to do that as well.

I will be using the Arduino code from the Two-way Serial Comm Lab as a template to build off of.   So far, I have the following coded in P5.js:

Pressing the mouse mimics the effect of pressing the button on the controller.  I need to investigate further working with the objects and arrays in order to keep the sketch from slowing down.

Here is a demo of the sketch from the Two-way Serial Comm Lab using 2 FSR’s to control the ball. 

 

My next steps are 1) get the code squared away, 2) test out/mock up housing for controller, and 3) investigate materials for final controller.