Tianhui- e 'ngoe ea baetsi le barekisi ba li-chip tsa UV LED ba etellang pele ho fana ka ts'ebeletso ea chip ea LED ea ODM/OEM UV ka lilemo tse fetang 22+.
Lintho tse ka sebelisoang:
1。 Obviously with power supply
2 Lebone la lebone la LED. 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
Ntlha ea pele, hokela nodemcu khomphuteng kapa laptop.
Joale kenya mokhanni oa nodemcu (ho sebelisa Google search).
Kamora ho bula Arduino IDE (ehlile, o hloka ho e khoasolla le ho e kenya), tobetsa Lisebelisoa ho bareng ea lithulusi ea Arduino, ebe o tobetsa boto, khetha mookameli oa boto ebe o batla ho kenya esp8266 (ho tla nka nako ho qeta)
Joale khetha "sketch" ho sesebelisoa sa Arduino, khetha "kenyelletsa laeborari", ebe u khetha "laeborari", batla "iremoteesp8266" 'me u e kenye.
Hona joale, ho phethela tlhophiso feela ka "lisebelisoa", o hloka ho ea "boardboard" ebe o khetha "nodemcu 1.0 (ESP 12-e)" kapa liphetolelo tse ling tsa esp8266.
Mohato oa 2: lokisetsa le ho leka IR LED
Pele, re hloka ho kenya
E-ea mona
Tseba lebone la hau la lebone la LED, ebang ke senotlolo sa 24 kapa senotlolo sa 44 (e kholoanyane) taolo e hole
Ho fumana khoutu ea taolo ea hole mona
Kamora ho kenya laeborari, re ile ra lokisa li-LED tsa rona tsa IR ka ho hokela li-IR LED joalo ka ha ho bonts'itsoe setšoantšong. Hokela IR e lebisitsoeng ho eona, ebe u kenya setšoantšo se latelang ebe u supa IR e lebisitsoeng ho molaoli. Leseli la LED le lokela ho bonesa (ho buloa le ho tima) // Taolo ea hole ka linotlolo tse 24 le 44 ka nako e le 'ngoe.
Mona ke khoutu ea ho etsa sena.
#define IR_ OFF 0xF740BF // Resective ir codes in 32 bits
#hlalosa IR_ KA 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);
}
Mohato oa 3: ho thaepa le ho lokisa microphone
Re tla sebelisa pin ea analog ea espe8266 A0 feela e le kenyelletso e le lets'oao la analog mme re e sebelise ho hlahisa lets'oao le thehiloeng ho infrared.
Kopanya pinana ho A0
Hokela 5V ho VIN (kaha node MCU ha e na tlhahiso ea 5V)
Ka tsela ena, re hokahanya pinana ea IR LED D2 ea khokahano ea ho tsamaisana le moamoheli oa lebone la lebone la LED.
a
Mohato oa 4: kenya khoutu 'me u itokise
# kenyeletsa
# kenyeletsa
#define microphonePin A0
int molumo;
int molumo1;
const int irPin = 4; // d2IRsend irsend(irPin); void setup() {
Serial.begin(9600);
pinMode(microphonePin, INPUT);
pinMode(irPin, OUTPUT);}
// ir led Codes
# hlalosa IR_ BPlus 0xFF3AC5 //
# hlalosa IR_ BMinus 0xFFBA45 //
#define IR_ ON 0xFF827D //
# hlalosa IR_ OFF 0xFF02FD //
#hlalosa IR_ R 0xFF1AE5 //
# hlalosa IR_ G 0xFF9A65 //
# hlalosa IR_ B 0xFFA25D //
# hlalosa IR_ W 0xFF22DD //
# hlalosa IR_ B1 0xFF2AD5 //
#define IR_ B2 0xFFAA55 //
# hlalosa IR_ B3 0xFF926D //
# hlalosa IR_ B4 0xFF12ED //
# hlalosa IR_ B5 0xFF0AF5 //
# hlalosa IR_ B6 0xFF8A75 //
# hlalosa IR_ B7 0xFFB24D //
# hlalosa IR_ B8 0xFF32CD //
# hlalosa IR_ B9 0xFF38C7 //
#define IR_ B10 0xFFB847 //
# hlalosa IR_ B11 0xFF7887 //
# hlalosa IR_ B12 0xFFF807 //
#define IR_ B13 0xFF18E7 //
# hlalosa IR_ B14 0xFF9867 //
# hlalosa IR_ B15 0xFF58A7 //
#define IR_ B16 0xFFD827 //
# hlalosa IR_ UPR 0xFF28D7 //
# hlalosa IR_ UPG 0xFFA857 //
# hlalosa IR_ UPB 0xFF6897 //
#define IR_ QUICK 0xFFE817 //
# hlalosa IR_ DOWNR 0xFF08F7 //
# hlalosa IR_ DOWNG 0xFF8877 //
# hlalosa IR_ DOWNB 0xFF48B7 //
# hlalosa IR_ SLOW 0xFFC837 //
# hlalosa IR_ DIY1 0xFF30CF //
# hlalosa IR_ DIY2 0xFFB04F //
# hlalosa IR_ DIY3 0xFF708F //
#define IR_ AUTO 0xFFF00F //
# hlalosa IR_ DIY4 0xFF10EF //
#define IR_ DIY5 0xFF906F //
# hlalosa IR_ DIY6 0xFF50AF //
# hlalosa IR_ FLASH 0xFFD02F //
# hlalosa IR_ JUMP3 0xFF20DF //
# hlalosa IR_ JUMP7 0xFFA05F //
# hlalosa IR_ FADE3 0xFF609F //
# hlalosa 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);}
Lintho tse ling tse ka sebelisoang:
1. Ho hlakile hore ka phepelo ea motlakase
2 Lebone la lebone la LED. Esp8266 / node MCU
3. Moetapele oa IR emitter
4. Khanyetso
5. Lenaneo la cable
6。 arduino ide
7. Soldering iron (tse ling tsa motheo tsa tjheseletsa)
8. 7805 IC (bakeng sa ho sebelisa phepelo ea motlakase ea LED joalo ka phepelo ea motlakase ea ESP)
9. Mohato oa 1: lokisetsa ESP
Ntlha ea pele, hokela nodemcu khomphuteng kapa laptop.
Joale kenya mokhanni oa nodemcu (ho sebelisa Google search).
Kamora ho bula Arduino IDE (ehlile, o hloka ho e khoasolla le ho e kenya), tobetsa Lisebelisoa ho bareng ea lithulusi ea Arduino, ebe o tobetsa boto, khetha mookameli oa boto ebe o batla ho kenya esp8266 (ho tla nka nako ho qeta)
Joale khetha "sketch" ho sesebelisoa sa Arduino, khetha "kenyelletsa laeborari", ebe u khetha "laeborari", batla "iremoteesp8266" 'me u e kenye.
Hona joale, ho phethela tlhophiso feela ka "lisebelisoa", o hloka ho ea "boardboard" ebe o khetha "nodemcu 1.0 (ESP 12-e)" kapa liphetolelo tse ling tsa esp8266.
Mohato oa 2: lokisetsa le ho leka IR LED
Pele, re hloka ho kenya
E-ea mona
Tseba lebone la hau la lebone la LED, ebang ke senotlolo sa 24 kapa senotlolo sa 44 (e kholoanyane) taolo e hole
Ho fumana khoutu ea taolo ea hole mona
Kamora ho kenya laeborari, re ile ra lokisa IR ea rona e etelletsoeng pele ka ho hokela IR LED joalo ka ha ho bonts'itsoe setšoantšong. Hokela IR e lebisitsoeng ho eona, ebe u kenya setšoantšo se latelang ebe u supa IR e lebisitsoeng ho molaoli. Lebone la lebone la LED le lokela ho bonesa (ho tima le ho tima). // taolo e hole e nang le linotlolo tsa 24 le 44 e ka sebelisoa ka nako e le 'ngoe.
Mona ke khoutu ea ho etsa sena.
#define IR_OFF 0xF740BF // Resective ir codes in 32 bits
#hlalosa IR_ON 0xF7C0
# kenyeletsa
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);
}
Mohato oa 3: ho thaepa le ho lokisa microphone
Re tla sebelisa pin ea analog ea espe8266 A0 feela e le kenyelletso e le lets'oao la analog mme re e sebelise ho hlahisa lets'oao le thehiloeng ho infrared.
Kopanya pinana ho A0
Hokela 5V ho VIN (kaha node MCU ha e na tlhahiso ea 5V)
Ka tsela ena, re hokahanya pinana ea IR LED D2 ea khokahano ea ho tsamaisana le moamoheli oa lebone la lebone la LED.
a
Mohato oa 4: kenya khoutu 'me u itokise
# kenyeletsa
# kenyeletsa
#define microphonePin A0
int molumo;
int molumo1;
const int irPin = 4; //d2IRsend irsend(irPin);void setup() {
Serial.begin(9600);
pinMode(microphonePin, INPUT);
pinMode(irPin, OUTPUT);}
// ir led Codes
# hlalosa IR_BPlus 0xFF3AC5 //
# hlalosa IR_BMinus 0xFFBA45 //
# hlalosa IR_ON 0xFF827D //
# hlalosa IR_OFF 0xFF02FD //
# hlalosa IR_R 0xFF1AE5 //
# hlalosa IR_G 0xFF9A65 //
# hlalosa IR_B 0xFFA25D //
# hlalosa IR_W 0xFF22DD //
# hlalosa IR_B1 0xFF2AD5 //
#define IR_B2 0xFFAA55 //
# hlalosa IR_B3 0xFF926D //
# hlalosa IR_B4 0xFF12ED //
#define IR_B5 0xFF0AF5 //
#define IR_B6 0xFF8A75 //
# hlalosa IR_B7 0xFFB24D //
# hlalosa IR_B8 0xFF32CD //
# hlalosa 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 //
# hlalosa IR_UPR 0xFF28D7 //
# hlalosa IR_UPG 0xFFA857 //
# hlalosa IR_UPB 0xFF6897 //
#define IR_QUICK 0xFFE817 //
# hlalosa IR_DOWNR 0xFF08F7 //
# hlalosa IR_DOWNG 0xFF8877 //
# hlalosa IR_DOWNB 0xFF48B7 //
# hlalosa IR_SLOW 0xFFC837 //
# hlalosa IR_DIY1 0xFF30CF //
#define IR_DIY2 0xFFB04F //
#define IR_DIY3 0xFF708F //
# hlalosa IR_AUTO 0xFFF00F //
# hlalosa IR_DIY4 0xFF10EF //
#define IR_DIY5 0xFF906F //
# hlalosa IR_DIY6 0xFF50AF //
# hlalosa IR_FLASH 0xFFD02F //
# hlalosa IR_JUMP3 0xFF20DF //
#define IR_JUMP7 0xFFA05F //
# hlalosa 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);}
tse ling
{
irsend.sendNEC(IR_FADE7, 32);
delay(120);
} Serial.println(sound1);
delay(50);
}
{
irsend.sendNEC(IR_FADE7, 32);
delay(120);
} Serial.println(sound1);
dela