Smart Objects

What is sound?

Improvised Instrument

Does the clank of a

copper wire and

balloon count?

 
 

Out of Many One

These 4 servos are synchronized to move at the same time yet not always making the same sound. Here is a video of trials and errors as well as moments of success.

 

How did I make it?

With an Arduino Board, many wires, a potentiometer and 4 servos you can easily make this happen at home.

 
 

Use this code — — —

Make sure to add the ArduinoUno Library

Check Arduinio>Tools>Board and Arduino>Tools>Port , especially if you are using a MacBook, as they can be very finnicky with Gemma boards, or other wearables. To make sure that the code is uploading on your board, a green light will be flashing.

It makes it easier to have red wires for power, black to ground, and yellow for “info” as I call it.

I named my servos based on which ones I purchased, hence 2,3,4 but you will see that they are connected on the right side of your board with numbers 6,5,4.

You can adjust the potentiometer with the latter part of the code.

Play around!

 

#include <Servo.h> //add servo library

Servo myservo1; //creat servo object to contro a servo

Servo myservo2;

Servo myservo3;

Servo myservo4;

int potpin = 0; //analog pin used to connect the potentiometer

int val; //variable to read the value from the analog pin

void setup() {

myservo1.attach(7); // attaches the servo on pin 9 to the servo object

myservo2.attach(6);

myservo3.attach(5);

myservo4.attach(4);

}

void loop() {

val = analogRead(potpin);

val = map(val, 0, 1023, 0, 180);// scale it to use it with the servo (value between 0 and 180)

myservo1.write(val); //sets the servo position according to the scaled value

myservo2.write(val);

myservo3.write(val);

myservo4.write(val);

delay(15); // waits 15ms for the servo to get there.

}