MB Trooper
Active Member
Hello RPF.
I am looking for help on creating from Arduino LED lights that will pulse with the sound files that I have for my B9 robot costume from the original 1960s Lost in Space. I am making B9 as a wearable costume and this is one of the very important parts of the robot.
I have never done anything in Arduino before so I am probably not starting with the easiest thing to do but this is what I need.
So when B9 specks his Neon lights up to the sound of his voice. I have a sound board on my tablet and I have the sound files for his iconic saying I just need to be able to get an LED strip to flash to the sound files.
I have bough a Arduino starter kit, an LED strip and a sound sensing module. A friend of mine sent me this link to a u-tube video on how to make LED lights pulse on a breadboard.
I am wondering if the code will work with an LED stripe. As well I need to have the 5V port for the sound sensor and LED strip. Can I just plug the 5V from the UNO into the negative row on the breadboard and plug in the wire for the sound sensor and the LED strip to this?
PROGRAM:
int DO = 2; //Pin for Digital Output - DO
int AO = A0; // Pin for Analog Output - AO
int threshold = 523; //Set minimum threshold for LED lit
int sensorvalue = 0;
void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
}
void loop() {
sensorvalue = analogRead(A0); //Read the analog value
Serial.print("Analog: ");
Serial.print(sensorvalue); //Print the analog value
Serial.print(" ");
Serial.print("Digital: ");
Serial.println(digitalRead(DO)); //Print the digital value
if (sensorvalue >= threshold) { //Compare analog value with threshold
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, HIGH);
digitalWrite(12, HIGH);
}
else {
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
digitalWrite(12, LOW);
}
}
Sorry for stupid questions this is totally out of my wheel house.
Thanks for any help on this.
I am looking for help on creating from Arduino LED lights that will pulse with the sound files that I have for my B9 robot costume from the original 1960s Lost in Space. I am making B9 as a wearable costume and this is one of the very important parts of the robot.
I have never done anything in Arduino before so I am probably not starting with the easiest thing to do but this is what I need.
So when B9 specks his Neon lights up to the sound of his voice. I have a sound board on my tablet and I have the sound files for his iconic saying I just need to be able to get an LED strip to flash to the sound files.
I have bough a Arduino starter kit, an LED strip and a sound sensing module. A friend of mine sent me this link to a u-tube video on how to make LED lights pulse on a breadboard.
I am wondering if the code will work with an LED stripe. As well I need to have the 5V port for the sound sensor and LED strip. Can I just plug the 5V from the UNO into the negative row on the breadboard and plug in the wire for the sound sensor and the LED strip to this?
PROGRAM:
int DO = 2; //Pin for Digital Output - DO
int AO = A0; // Pin for Analog Output - AO
int threshold = 523; //Set minimum threshold for LED lit
int sensorvalue = 0;
void setup() {
Serial.begin(9600);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);
}
void loop() {
sensorvalue = analogRead(A0); //Read the analog value
Serial.print("Analog: ");
Serial.print(sensorvalue); //Print the analog value
Serial.print(" ");
Serial.print("Digital: ");
Serial.println(digitalRead(DO)); //Print the digital value
if (sensorvalue >= threshold) { //Compare analog value with threshold
digitalWrite(8, HIGH);
digitalWrite(9, HIGH);
digitalWrite(10, HIGH);
digitalWrite(11, HIGH);
digitalWrite(12, HIGH);
}
else {
digitalWrite(8, LOW);
digitalWrite(9, LOW);
digitalWrite(10, LOW);
digitalWrite(11, LOW);
digitalWrite(12, LOW);
}
}
Sorry for stupid questions this is totally out of my wheel house.
Thanks for any help on this.
Last edited: