Collaborative Racing Game for Campus School

by mattdks4 in Circuits > Microcontrollers

159 Views, 1 Favorites, 0 Comments

Collaborative Racing Game for Campus School

Collaborative Racing Game for Campus School

I built a 2 player cooperative "race" game that is compatible with adaptive switches. I built this for the Campus School, a special education school on the grounds of Boston College. The school services students that face complex educational challenges, but resources for these students are limited. This game will be given to the school to give the students something to use that they would not have had access to before. I created a game because I wanted to give these students a chance to have more fun opportunities, just like what I would've wanted at their age. Each player takes turns pushing a button to light up an additional LED on the board. Once both players reach the finish line, the lights flash in red and yellow and For Boston, Boston College's fight song, plays. The game then resets itself after 10 seconds.

Supplies

Electrics:

  • CPB
  • Adaptive Switches
  • Wires for switches
  • LED strands
  • Battery Pack
  • Speaker
  • Alligator Clips

Assembly:

  • Laser Cutter
  • 1/8 inch acrylic sheets
  • Clear Tape
  • Hot Glue
  • Nuts and Bolts

Code

Screenshot 2023-05-03 215712.png
Screenshot 2023-05-03 215732.png
Screenshot 2023-05-03 215747.png

This code is fairly simple, using a CPB to control the LED strand. I used two arrays with the locations of the lights that should turn on for both the red and yellow sides, to make quick changes to code once the LEDs were attached. I created a function to animate the lights once the game is finished and have it run when sound is playing. The code uses two debounced buttons to check if the switches have been pressed and uses a variable named 'turn' to check if the right player has hit the button.

Downloads

Laser Cutting

70457260776__F2580B8A-5DE4-456D-A645-AD970E0C66DB.jpeg
70466400410__D072B302-406C-474E-A196-D81027F89729.jpeg

I chose to create a box out of acrylic as it would make the build more colorful and fun. I used a dark green for the top as a darker background allows the LEDs to stand out more, which adds to the visual accessibility of the project. I added holes for the LEDs to be later attached to, as well as engraved the words "start" and "finish" to create more of a game board. It took a couple of tries to get the design just right, but I am happy with the result.

Assembly

IMG_5027.jpeg
IMG_5034.jpeg
70469523167__7223A3B8-69F4-4B81-B1AD-353C3616E8AC.jpeg

After some issues, I recut a couple of parts to add holes for the accessible switch wires. I hot glued the bottom and sides of the box together but decided to leave the top so it could be more easily removed to access the parts inside. On the back of the top, I taped the LED strand, placing 20 of the LEDs on top of the holes. I added a couple of extra pieces of tape to keep the remaining ones a bit more organized. I attached the LED and wires to the CPB using a small nut and bolt for each necessary wire. I attached the speaker to the CPB with alligator clips. I connected the CPB to a battery pack that I kept out of the box, allowing the game to be turned on and off. Finally, I attached the top to the box by snapping it into place.