Back to Parent

Implementation

The overall idea of the implementation is --> the tiles are made of plywood and have a grid structure underneath. All nine banana tiles act as a switch, and when one punches the tile, they will activate the switch and send a signal to the Arduino, the Arduino will then program the LED strip which is hidden in the grid to create a ripple effect.

Fabrication:

Circuiting: see graph below

Arduino (lost when my computer fried) :

  • Each of the nine switches is connected as an input on the Arduino 
  • The code uses object oriented programming, and implements the Banana class, and the Ripple class. The grid is represented as an 2D array of Banana objects. And there is a vector that keeps tracks of all the Ripples present at any arbitrary moment. When the program starts, the grid of Bananas are initialized and no Ripple exists. The loop() function first checks all nine switches. When a switch is turned on, a new ripple object will be created and added to the vector. Then loop() will update every Ripple, and the Ripple will call its expand() method which will make the ripple bigger by changing the colors of the Banana objects. When the Ripple is bigger than the board, it will be deleted from the vector. In the end, loop() will change the color on the LED strip based on the colors of the Banana objects.
  • The code uses the WS2801 library to program the LED's.





Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0