New Code: Sound Reactive Nightgown

I received some code from Kurt for the arduino that is similar to the code created for the Sound Reactive Nightgown:


int ledPin = 13;                // LED connected to digital pin 13
int audPin = 0;
int val = 0;

void setup()                    // run once, when the sketch starts
pinMode(ledPin, OUTPUT);      // sets the digital pin as output
pinMode(audPin, INPUT);

void loop()                     // run over and over again
val = analogRead(audPin);

if (val < 300) {
return;  //check this in the references // also try “exit;”
else {
digitalWrite(ledPin, LOW);    // sets the LED off

void myMove() {
digitalWrite(ledPin, HIGH);   // sets the LED on



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s