Hannah Jiang



Get in touch if you want to chat about design or just simply want to say HI!

haiyuanj@gmail.com

Week 5 – The Motors

The Concept

I used to be an electronic music fan and I went to a lot of music festivals and danced for a night or even a whole day.
I never learned how to dance growing up, neither did my friends whom I went to the music festivals with. Thus I always believe that everyone could be a dancer, as long as the music is good enough.

I used a servo motor as the output and a sound detector as the input and made a little person who danced while there was music playing.

The Circuit

The Enclosure

The Outcome

The code:

int soundSensor = 2;
int LED = 3;

void setup() {
pinMode(soundSensor, INPUT);
pinMode(LED, OUTPUT);
}

void loop() {
int statusSensor = digitalRead(soundSensor);

if(statusSensor == 1)
{
digitalWrite(LED, HIGH);
}
else{
digitalWrite(LED,LOW);
}
}