Inspiration

A fresh raspberry pi, the rumour of an unconventional programming language, and the promise of a truly epic cruise

What it does

The Hype Machine plays a custom audio file that was coded in Sonic Pi through a Bluetooth speaker via a Python Script based on whether or not you are riding an electric longboard

How we built it

This particular hack involves a handful of different technologies working together

The Sonic Pi Audio

Sonic Pi is a programming language that allows you to code music. Building off of an example provided in the IDE (by Sam Aaron) we tweaked the thread loops to fine-tune the sound we were looking for. We also recorded audio samples by The Flying Wombats themselves (as well as added in some pre-loaded samples) to play at various cues throughout the loops.

The sonic pi file was then exported to a wav file to make handling easier

The Python Script

The Python script reads in the current from the battery to determine whether or not the board is moving. Based on this value the python-vlc library will play/pause the wav file (that will repeat if finished)

The audio is then redirected to an external Bluetooth speaker

Challenges we ran into

-Spending 12 hours trying to read a single byte of information (moving / not moving) -Redirecting audio to Bluetooth speakers

Accomplishments that we're proud of

-Finishing the hack :) -Learning a new programming language on the fly -Bringing together so many moving parts (no pun intended) successfully

What we learned

-Cycling power is sometimes an effective debugging strategy -VESC encodes data weird -Raspberry Pi 3 does not support Bluetooth as a default audio out

What's next for The Hype Machine

the beach boardwalk and picking up the babes

Built With

Share this project:

Updates