Flappy Melody is an interactive game installation. The idea was inspired by Flappy Bird; users control the bird to avoid the coming barriers. In Flappy Melody, we use FerroFluid as the moving ‘bird’, its position changes by different tones, and the barrier would rotate and change at the same time, followed by the voice.
Players would use their voice, sing a melody to control the FerroFluid away from musical notes as barriers. ( *Ideally, once users hit the barrier, FerroFluid would drop and barriers go back to origin to start again.)
Interacting with the game would be a studying process – at first users will try multiple times to get the patterns of the game, and once they succeed in several moves, they will find the song we programmed as success is ‘Merry Christmas’ and finish the game.
- p5js: sound library, to detect the frequency from the voice input
- Serial Communication: sending pitch data to Arduino
- 2 Belt & Pulley system to control the two motions
- *Electromagnets to drop or attract FerroFluid for game setting (not added the project yet)
Each time users make a voice (with a different tone), p5 will send a message to Arduino to control the motions. A smaller stepper motor with 2 pulleys would rotate a specific angle and drive the barrier’s rotation; A bigger motor with 3 pulleys, and a magnet attached to the belt, would turn an angle corresponding with the change of the tone, the magnet on the belt would have a linear movement to control the ferrofluid by magnetic force. (*By counting the rotation counts, compared it with the turning angle of the bigger motor to determine whether players hit the barriers or not, and control the switch of the electromagnet.)
1 – Testing with Materials
Details in previous posts, a lot of experiments with treatment and primers to get an ideal result.
Determined by the features of ferrofluid, we use two glass jars as the containers, the suspension (60% alcohol) and ferrofluid is in the gap between 2 glass jars. I spent a lot of time trying to find the right suspension and containers, and there are several chemical related issues to figure out! (Thanks to Chenshan for helping me with the stain problems)
2 – Programming ( Live Codes Here )
- Tone Detection: Studying from the source code in the p5 library and Tom’s Github.
- Serial Communication:
- Stepper Motor Control ( Coded by Jingyi )
- Refine Arduino Code for Communication and Interactions
In Jingyi’s code, she can control the angle(steps) the motor move, what we need is more like a ‘turn to XX’ than ‘turn XXX’, so combining it with p5 code, I send the number of destinations to Arduino and did a little math to change the stepper.
3 – Build Circuit & Fabricate the Mechanism
- Linear Motion
4 – Final Adjustments & (*Pooooorly) Fabricate the Enclosure