loading

Tianhui- one of the leading UV LED chip manufacturers and suppliers provides ODM/OEM UV led chip service.

Making of Sound Response Soap IR LED Strip

Consumables:



1。 Obviously with power supply

2 LED light bar. Esp8266 / node MCU

3。 IR emitter leader

4。 resistance



5。 Programming cable

6。 arduino ide

7。 Soldering iron (some basic welding)

8。 7805 IC (for using LED power supply as ESP power supply)

9。 Step 1: prepare ESP

First, connect nodemcu to a computer or laptop.

Now install the driver for nodemcu (using Google search).

After opening the Arduino IDE (of course, you need to download and install it), click Tools on the Arduino toolbar, then click board, select board manager and search for esp8266 installation (it will take some time to complete)

Now select "sketch" from the Arduino toolbar, select "include library", then select "manage library", search for "iremoteesp8266" and install it

Now, to complete the configuration only through "tools", you need to go to "motherboard" and select "nodemcu 1.0 (ESP 12-e)" or other versions of esp8266.

Step 2: prepare and test the IR LED

First, we need to install

Go here

Identify your LED light strip, whether it is a 24 key or 44 key (larger) remote control

To get the remote control code here

After installing the library, we ed prepare our IR LEDs by connecting the IR LEDs as shown in the figure. Connect the IR led to it, then upload the following sketch and point the IR led to the controller. The LED bar should flash (on and off)// Remote control with 24 and 44 keys at the same time.

Here is the code to do this.

#define IR_ OFF 0xF740BF //Resective ir codes in 32 bits

#define IR_ ON 0xF7C0

#includeIRsend irsend(4); // IR pin

void setup() {

irsend.begin();

}

void loop() {

irsend.sendNEC(IR_ON, 32);

delay(5000);

irsend.sendNEC(IR_OFF, 32);

delay(5000);

}

Step 3: wiring and preparing the microphone

We will only use the analog pin of espe8266 A0 as the input as the analog signal and use it to trigger the sound based infrared signal

Connect out pin to A0

Connect 5V to VIN (as node MCU has no 5V output)

In this way, we connect the IR LED D2 pin of the alignment connection to the receiver of the LED light bar.

a

Step 4: upload the code and get ready

#include

#include

#define microphonePin A0

int sound;

int sound1;

const int irPin = 4; // d2IRsend irsend(irPin); void setup() {

Serial.begin(9600);

pinMode(microphonePin, INPUT);

pinMode(irPin, OUTPUT);}

// ir led Codes

#define IR_ BPlus 0xFF3AC5 //

#define IR_ BMinus 0xFFBA45 //

#define IR_ ON 0xFF827D //

#define IR_ OFF 0xFF02FD //

#define IR_ R 0xFF1AE5 //

#define IR_ G 0xFF9A65 //

#define IR_ B 0xFFA25D //

#define IR_ W 0xFF22DD //

#define IR_ B1 0xFF2AD5 //

#define IR_ B2 0xFFAA55 //

#define IR_ B3 0xFF926D //

#define IR_ B4 0xFF12ED //

#define IR_ B5 0xFF0AF5 //

#define IR_ B6 0xFF8A75 //

#define IR_ B7 0xFFB24D //

#define IR_ B8 0xFF32CD //

#define IR_ B9 0xFF38C7 //

#define IR_ B10 0xFFB847 //

#define IR_ B11 0xFF7887 //

#define IR_ B12 0xFFF807 //

#define IR_ B13 0xFF18E7 //

#define IR_ B14 0xFF9867 //

#define IR_ B15 0xFF58A7 //

#define IR_ B16 0xFFD827 //

#define IR_ UPR 0xFF28D7 //

#define IR_ UPG 0xFFA857 //

#define IR_ UPB 0xFF6897 //

#define IR_ QUICK 0xFFE817 //

#define IR_ DOWNR 0xFF08F7 //

#define IR_ DOWNG 0xFF8877 //

#define IR_ DOWNB 0xFF48B7 //

#define IR_ SLOW 0xFFC837 //

#define IR_ DIY1 0xFF30CF //

#define IR_ DIY2 0xFFB04F //

#define IR_ DIY3 0xFF708F //

#define IR_ AUTO 0xFFF00F //

#define IR_ DIY4 0xFF10EF //

#define IR_ DIY5 0xFF906F //

#define IR_ DIY6 0xFF50AF //

#define IR_ FLASH 0xFFD02F //

#define IR_ JUMP3 0xFF20DF //

#define IR_ JUMP7 0xFFA05F //

#define IR_ FADE3 0xFF609F //

#define IR_ FADE7 0xFFE01F //

void loop() {

sound = analogRead(microphonePin); // getting input audio signal reading

Serial.print(sound); // input audio signal readings to Serial display

Serial.print(“ ”);

if (sound 》 415)

{

sound1 = map(sound, 415, 750, 140, 255); // mapping higher frequency values which are above offset to the scale of 150 - 255

}

else if (sound 》 340 && sound 《 415) // keeping offset reading to zero scale..here offset value in the range of 340 - 415(offset value at 1.45v) 。.its depends on componets used in circuit.。

{

sound1 = map(sound, 340, 415, 0, 9);

}

else if (sound 《 340)

{

sound1 = map(sound, 0, 340, 10, 139); // keeping below offset readings to scale of 1-139.。

}

if (sound1 》 240)

{

irsend.sendNEC(IR_FLASH, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

}

else if ((sound1) 》 200)

{

irsend.sendNEC(IR_G, 32);

irsend.sendNEC(IR_B, 32);

delay(120);}

else if (sound1 》 160)

{

irsend.sendNEC(IR_R, 32);

irsend.sendNEC(IR_B, 32);

delay(120);

}

else if (sound1 》 120)

{

irsend.sendNEC(IR_B, 32);

delay(120);

}

else if (sound1 》 80)

{

irsend.sendNEC(IR_B, 32);

delay(120);

}

else if (sound1 》 40)

{

irsend.sendNEC(IR_G, 32);

delay(120);

}

else if (sound1 》 10)

{

irsend.sendNEC(IR_R, 32);

delay(120);}

Else consumables:

1. Obviously with power supply

2 LED light bar. Esp8266 / node MCU

3. IR emitter leader

4. Resistance

5. Programming cable

6。 arduino ide

7. Soldering iron (some basic welding)

8. 7805 IC (for using LED power supply as ESP power supply)

9. Step 1: prepare ESP

First, connect nodemcu to a computer or laptop.

Now install the driver for nodemcu (using Google search).

After opening the Arduino IDE (of course, you need to download and install it), click Tools on the Arduino toolbar, then click board, select board manager and search for esp8266 installation (it will take some time to complete)

Now select "sketch" from the Arduino toolbar, select "include library", then select "manage library", search for "iremoteesp8266" and install it

Now, to complete the configuration only through "tools", you need to go to "motherboard" and select "nodemcu 1.0 (ESP 12-e)" or other versions of esp8266.

Step 2: prepare and test the IR LED

First, we need to install

Go here

Identify your LED light strip, whether it is a 24 key or 44 key (larger) remote control

To get the remote control code here

After installing the library, we ed prepare our IR led by connecting the IR LED as shown in the figure. Connect the IR led to it, then upload the following sketch and point the IR led to the controller. The LED light bar should flash (on and off). / / the remote control with 24 and 44 keys can be used at the same time.

Here is the code to do this.

#define IR_OFF 0xF740BF //Resective ir codes in 32 bits

#define IR_ON 0xF7C0

#include

IRsend irsend(4); // IR pin

void setup() {

irsend.begin();

}

void loop() {

irsend.sendNEC(IR_ON, 32);

delay(5000);

irsend.sendNEC(IR_OFF, 32);

delay(5000);

}

Step 3: wiring and preparing the microphone

We will only use the analog pin of espe8266 A0 as the input as the analog signal and use it to trigger the sound based infrared signal

Connect out pin to A0

Connect 5V to VIN (as node MCU has no 5V output)

In this way, we connect the IR LED D2 pin of the alignment connection to the receiver of the LED light bar.

a

Step 4: upload the code and get ready

#include

#include

#define microphonePin A0

int sound;

int sound1;

const int irPin = 4; //d2IRsend irsend(irPin);void setup() {

Serial.begin(9600);

pinMode(microphonePin, INPUT);

pinMode(irPin, OUTPUT);}

// ir led Codes

#define IR_BPlus 0xFF3AC5 //

#define IR_BMinus 0xFFBA45 //

#define IR_ON 0xFF827D //

#define IR_OFF 0xFF02FD //

#define IR_R 0xFF1AE5 //

#define IR_G 0xFF9A65 //

#define IR_B 0xFFA25D //

#define IR_W 0xFF22DD //

#define IR_B1 0xFF2AD5 //

#define IR_B2 0xFFAA55 //

#define IR_B3 0xFF926D //

#define IR_B4 0xFF12ED //

#define IR_B5 0xFF0AF5 //

#define IR_B6 0xFF8A75 //

#define IR_B7 0xFFB24D //

#define IR_B8 0xFF32CD //

#define IR_B9 0xFF38C7 //

#define IR_B10 0xFFB847 //

#define IR_B11 0xFF7887 //

#define IR_B12 0xFFF807 //

#define IR_B13 0xFF18E7 //

#define IR_B14 0xFF9867 //

#define IR_B15 0xFF58A7 //

#define IR_B16 0xFFD827 //

#define IR_UPR 0xFF28D7 //

#define IR_UPG 0xFFA857 //

#define IR_UPB 0xFF6897 //

#define IR_QUICK 0xFFE817 //

#define IR_DOWNR 0xFF08F7 //

#define IR_DOWNG 0xFF8877 //

#define IR_DOWNB 0xFF48B7 //

#define IR_SLOW 0xFFC837 //

#define IR_DIY1 0xFF30CF //

#define IR_DIY2 0xFFB04F //

#define IR_DIY3 0xFF708F //

#define IR_AUTO 0xFFF00F //

#define IR_DIY4 0xFF10EF //

#define IR_DIY5 0xFF906F //

#define IR_DIY6 0xFF50AF //

#define IR_FLASH 0xFFD02F //

#define IR_JUMP3 0xFF20DF //

#define IR_JUMP7 0xFFA05F //

#define IR_FADE3 0xFF609F //

#define IR_FADE7 0xFFE01F //

void loop() {

sound = analogRead(microphonePin); // getting input audio signal reading

Serial.print(sound); // input audio signal readings to Serial display

Serial.print(“ ”);

if (sound 》 415)

{

sound1 = map(sound, 415, 750, 140, 255); // mapping higher frequency values which are above offset to the scale of 150 - 255

}

else if (sound 》 340 && sound 《 415) // keeping offset reading to zero scale..here offset value in the range of 340 - 415(offset value at 1.45v) 。.its depends on componets used in circuit.。

{

sound1 = map(sound, 340, 415, 0, 9);

}

else if (sound 《 340)

{

sound1 = map(sound, 0, 340, 10, 139); // keeping below offset readings to scale of 1-139.。

}

if (sound1 》 240)

{

irsend.sendNEC(IR_FLASH, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

irsend.sendNEC(IR_QUICK, 32);

}

else if ((sound1) 》 200)

{

irsend.sendNEC(IR_G, 32);

irsend.sendNEC(IR_B, 32);

delay(120);}

else if (sound1 》 160)

{

irsend.sendNEC(IR_R, 32);

irsend.sendNEC(IR_B, 32);

delay(120);

}

else if (sound1 》 120)

{

irsend.sendNEC(IR_B, 32);

delay(120);

}

else if (sound1 》 80)

{

irsend.sendNEC(IR_B, 32);

delay(120);

}

else if (sound1 》 40)

{

irsend.sendNEC(IR_G, 32);

delay(120);

}

else if (sound1 》 10)

{

irsend.sendNEC(IR_R, 32);

delay(120);}

else

{

irsend.sendNEC(IR_FADE7, 32);

delay(120);

} Serial.println(sound1);

delay(50);

}

{

irsend.sendNEC(IR_FADE7, 32);

delay(120);

} Serial.println(sound1);

dela

About Making of Sound Response Soap IR LED Strip

Send your inquiry
no data
Contact us
we welcome custom designs and ideas and is able to cater to the specific requirements. for more information, please visit the website or contact us directly with questions or inquiries.
one of the most professional UV LED suppliers in China
You can find  us here
2207F Yingxin International Building, No.66 Shihua West Road, Jida, Xiangzhou District, Zhuhai City,Guangdong, China
Customer service
detect