Experimental Interaction Finals – Twinkle

Twinkle is an interactive object that me and Dhanusha came up with based on the idea of play and fun. What came to my mind first was TeamLab’s interactive installation titled Homogenizing and Transforming World as shown below:


This installation was showcased at the National Gallery Singapore for the Children’s Biennale last year. This particular installation includes several balls and each of them  will change its colour once touched. The balls will then send each other signals when touched and the rest of the balls will follow suit to change their colour. This interactivity included in the Children’s Biennale inspired us greatly because we felt that kids learn best when they can experience things by using their senses. Therefore, we wanted to include the aspect of light and sound into  the object that we were going to create.

Initially, we wanted to create an installation  by using a space and fill the space with stars as shown below:


Each star will then have a tune that is part of the nursery song Twinkle Twinkle Little Star but later on I realised I’m not sure how I can attach a light to each star so that when touched each star will give off different colours. Therefore, we ended up making an object instead although I would totally love to learn how to make our initial idea work if there’s a chance.

The Process

Materials Used:

  1. Arduino
  2. Speaker
  3. Adafruit NeoPixel Ring
  4. Wires


As for the star itself, we made use of a hard plastic sheet to create a base then layer it over with tracing paper.

I start off by searching for the code of the tune of Twinkle Twinkle Little Star online. I managed to find one from <https://gist.github.com/baojie/4522173#file-arduino_music-c>. This code plays the melody of Twinkle Twinkle Little Star. The notes of Twinkle Twinkle Little Star are pretty simple.

In this code, the notes are as follow:

char notes[] = “ccggaag ffeeddc ggffeed ggffeed ccggaag ffeeddc “;

so basically it will repeatedly play this tune when plugged into pin 11 as written in the code. In this code, there were 8 notes written as shown below:

char names[] = { ‘c’, ‘d’, ‘e’, ‘f’, ‘g’, ‘a’, ‘b’, ‘C’ };
int tones[] = { 1915, 1700, 1519, 1432, 1275, 1136, 1014, 956 };

However, we could only code 6 tunes onto the Arduino so we ended up cutting down the last 2 notes. Initially, we thought this was going to be a problem because we wanted our object to be able to play the full song yet we had to cut 2 notes. Later on, I realised that the notes played were actually the first 6 notes.

With corey’s help in setting up the speaker and the Arduino, we managed to play the tune of Twinkle Twinkle Little Star. Thereafter, Corey helped us to look for codes for the capacity of touch so that we can code each note to the respective pins on the Arduino as shown below:

The next part was to work with the lights. Corey kindly gave us an Adafruit NeoPixel Ring for our project. I decided to follow the colours of the rainbow and code each note to the colour red, orange, yellow, green, blue and purple. This is how the code looks like for this part:

playTone(1915, 80);
colorWipe(strip.Color(255, 0, 0), 50); // Red

if (value1 > 40){

playTone(1700, 80);
colorWipe(strip.Color(255, 165, 0), 50); // Orange

if (value2 > 40){

playTone(1519, 80);
colorWipe(strip.Color(255, 255, 0), 50); // Yellow

if (value3 > 40){

playTone(1432, 80);
colorWipe(strip.Color(0, 255, 0), 50); // Green

if (value4 > 40){

playTone(1275, 80);
colorWipe(strip.Color(0, 0, 255), 50); // Blue

if (value5 > 40){

playTone(1136, 80);
colorWipe(strip.Color(128, 0, 128), 50); // Purple

Finally, the entire outlook actually looks like that:

Honestly, compared to the other groups, our project idea is pretty simple. We just wanted to create something fun and also have fun at the same time while experimenting. For someone who doesn’t know anything about coding, I think the two of us did ok hahaha. We definitely had fun coming up with the final outcome and I was really fascinated by it. At the same time, it is pretty satisfying to see that your code actually worked out. In addition, only when I was doing the finals that I realised the Arduino library is amazing. There are many different codes available for us to experiment. The most amazing thing to me which might sound dumb is that the 8ohm speaker can actually make sound. That is when I realised there’s so much more to experimenting with the Arduino. I do hope I will have a chance to do more fun experiments with it 😀

FINALLY FINALLY, the last thing I did was to play Twinkle Twinkle Little Star for yall! Here you go: https://www.dropbox.com/s/45ow19eoutpt6mn/video.mp4?dl=0

Enjoy!! 🙂

Leave a Reply

Skip to toolbar