“(Final Backyard Project) Apollo: Environmental Music Generator, by Kadallah Burrowes and Zhuoling Shi (Susan), Instructor Daniel Mikesell

For this project, our concept was to create an environmental music generator which can read value from sensors and generate music according to the sensors.

There are 2 parts of this project: music programming and hardware processing. Kadallah was in charge of music programming and I was in charge of raspberry pi.

The equipments I used were raspberry pi 3, Grove pi+, grove air quality sensor, grove uv sensor, grove light sensor, grove temp & humi sensor, grove sound sensor and a grove LED.

I installed noobs on Raspberry pi.


Then installed the Grovepi folder on the desktop.


There were many other packages to be download in order to run raspberry pi with grove pi successfully.

After that I plugged in the grove and then the sensors.

I wrote some programs to read values from the sensors. The codes were modified from either wikipedia of those sensors or other tutorials.

Extra packages were needed to run the python code.


In all the process above, the most common problem was that certain packages are needed to run certain functions, but I did not know what packages are needed. I spent 2 week on setting all these up.

After I got the sensors to work, I dowloaded the pikeyboard library in other to simulate keyboard in the program.

I set a range and if the value from a particular sensor changes out of the range, it will send out a key function.

The key function can change the content in sonic pi and change the music.

The problem that I encountered here was the music could only come out through HDMI from the monitor but could not be switched to headphone jack. I have been working for a week and tried all kinds of documentations but none of them worked. I asked Aven for help and he could not figure it out either. Days after, my boyfriend Jack B. Du came back from New York and helped me with this. He accidentally made the sound coming out of the headphone jack and default to be from headphone jack but the volume could not be changed by raspberry pi. We could not switch to HDMI in this case, either.

Another problem is that we wanted the program to run once it boots, however I only got it to run in the background and could not affect other programs. The way to fix it is to work in the command line instead of GUI. In this pi, there was no option to switch to GUI. I worked with my boyfriend and searched for plenty of tutorials and finally got the command lines.

The most serious problem in this project which caused it unable to work is that sonic pi does not have a command line interface, which means we have to use a monitor and a mouse to click on the sonic pi tab every time when it boots.

Leave a Reply