一区二区三区三上|欧美在线视频五区|国产午夜无码在线观看视频|亚洲国产裸体网站|无码成年人影视|亚洲AV亚洲AV|成人开心激情五月|欧美性爱内射视频|超碰人人干人人上|一区二区无码三区亚洲人区久久精品

0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

聲音響應(yīng)Cheap Ir Led Strip的制作

454398 ? 來源:網(wǎng)絡(luò)整理 ? 作者:網(wǎng)絡(luò)整理 ? 2019-12-09 15:18 ? 次閱讀
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

耗材:

1。明顯帶有電源

2的LED燈條。 esp8266/節(jié)點(diǎn)mcu

3。 Ir Emitter領(lǐng)導(dǎo)

4。電阻

5。編程電纜

6。 arduino ide

7。烙鐵(一些基本的焊接)

8。 7805 ic(用于使用led電源作為esp電源)

9。步驟1:準(zhǔn)備Esp

首先,將Nodemcu與計算機(jī)或筆記本電腦連接。

現(xiàn)在安裝nodemcu(使用谷歌搜索)的驅(qū)動程序。

打開后,Arduino IDE(當(dāng)然,您需要下載并安裝它)單擊Arduino工具欄上的“工具”,然后單擊“木板”選擇“Board Manager”并搜索esp8266安裝(需要一些時間才能完成)

現(xiàn)在,從中選擇“素描” Arduino工具欄選擇“包含庫”,然后選擇“管理庫”,搜索“ IRremoteESP8266”并安裝

現(xiàn)在,僅通過“工具”完成配置需要轉(zhuǎn)到“主板”,選擇“NodeMcu 1.0(ESP 12-E)”或其他版本的ESP8266。

步驟2:準(zhǔn)備和測試IR LED

聲音響應(yīng)Cheap Ir Led Strip的制作

首先,我們需要安裝

轉(zhuǎn)到此處

標(biāo)識您的led燈帶,無論是24鍵還是44鍵(更大的一個)遙控器

以獲取遙控器代碼在這里

安裝庫后,我們ed通過按圖所示連接IR LED來準(zhǔn)備我們的IR LED。在其上連接IR LED,然后上傳以下草圖并將IR LED指向控制器。 LED燈條應(yīng)閃爍(打開和關(guān)閉)。//可同時使用24和44鍵的遙控器。

HERE是執(zhí)行此操作的代碼。

#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);

}

步驟3:接線和準(zhǔn)備麥克風(fēng)

我們將僅使用Espe8266 A0的模擬引腳作為輸入作為模擬信號,并使用它來觸發(fā)基于聲音的紅外信號

將Out Pin連接到a0

將5V連接到Vin(AS節(jié)點(diǎn)mcu沒有5v輸出)

就是這樣,我們將對準(zhǔn)連接的IR LED D2引腳連接到LED燈條的接收器。

a

步驟4:上傳代碼并準(zhǔn)備就緒

#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耗材:

1。明顯帶有電源

2的LED燈條。 esp8266/節(jié)點(diǎn)mcu

3。 Ir Emitter領(lǐng)導(dǎo)

4。電阻

5。編程電纜

6。 arduino ide

7。烙鐵(一些基本的焊接)

8。 7805 ic(用于使用led電源作為esp電源)

9。步驟1:準(zhǔn)備Esp

首先,將Nodemcu與計算機(jī)或筆記本電腦連接。

現(xiàn)在安裝nodemcu(使用谷歌搜索)的驅(qū)動程序。

打開后,Arduino IDE(當(dāng)然,您需要下載并安裝它)單擊Arduino工具欄上的“ 工具”,然后單擊“ 木板”選擇“ Board Manager ”并搜索esp8266安裝(需要一些時間才能完成)

現(xiàn)在,從中選擇“ 素描” Arduino工具欄選擇“包含庫”,然后選擇“管理庫”,搜索“ IRremoteESP8266”并安裝

現(xiàn)在,僅通過“ 工具”完成配置需要轉(zhuǎn)到“ 主板”,選擇“ NodeMcu 1.0(ESP 12-E)”或其他版本的 ESP8266 。

步驟2:準(zhǔn)備和測試IR LED

首先,我們需要安裝

轉(zhuǎn)到此處

標(biāo)識您的led燈帶,無論是24鍵還是44鍵(更大的一個)遙控器

以獲取遙控器代碼在這里

安裝庫后,我們ed通過按圖所示連接IR LED來準(zhǔn)備我們的IR LED。在其上連接IR LED,然后上傳以下草圖并將IR LED指向控制器。 LED燈條應(yīng)閃爍(打開和關(guān)閉)。//可同時使用24和44鍵的遙控器。

HERE是執(zhí)行此操作的代碼。

#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);

}

步驟3:接線和準(zhǔn)備麥克風(fēng)

我們將僅使用Espe8266 A0的模擬引腳作為輸入作為模擬信號,并使用它來觸發(fā)基于聲音的紅外信號

將Out Pin連接到a0

將5V連接到Vin(AS節(jié)點(diǎn)mcu沒有5v輸出)

就是這樣,我們將對準(zhǔn)連接的IR LED D2引腳連接到LED燈條的接收器。

a

步驟4:上傳代碼并準(zhǔn)備就緒

#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);

delay(50);

}

責(zé)任編輯:wv

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點(diǎn)僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • led
    led
    +關(guān)注

    關(guān)注

    242

    文章

    23847

    瀏覽量

    674213
  • Arduino
    +關(guān)注

    關(guān)注

    190

    文章

    6498

    瀏覽量

    192207
收藏 人收藏
加入交流群
微信小助手二維碼

掃碼添加小助手

加入工程師交流群

    評論

    相關(guān)推薦
    熱點(diǎn)推薦

    一個藍(lán)牙音響模式DIY過程遇到的困境

    春節(jié)回家過年,老丈人買了個藍(lán)牙音響,想要AUX接入樂器,同時打開藍(lán)牙模式,手機(jī)播放伴奏音樂。但這個音響只能單模式,要么AUX模式下,正常播放,切換到藍(lán)牙模式AUX就沒有任何聲音。 我拆機(jī)發(fā)現(xiàn),主板
    發(fā)表于 02-05 21:29

    6050 Ultimate Channel Strip介紹

    6050 Ultimate Channel Strip具備讓您的混音效果出色所需的一切。其中包含了屢獲殊榮的6020 Ultimate EQ和6030 Ultimate Compressor插件中
    的頭像 發(fā)表于 01-22 10:29 ?459次閱讀
    6050 Ultimate Channel <b class='flag-5'>Strip</b>介紹

    艾邁斯歐司朗發(fā)布紅外LED新品,搭載全新IR:6技術(shù)

    全新IR:6薄膜紅外LED芯片技術(shù),提供850nm、940nm及新增920nm波長選項(xiàng); OSLON? P1616與OSLON? Black系列是首批采用IR:6技術(shù)的產(chǎn)品,為客戶提供直接替換方案
    的頭像 發(fā)表于 11-26 09:35 ?514次閱讀
    艾邁斯歐司朗發(fā)布紅外<b class='flag-5'>LED</b>新品,搭載全新<b class='flag-5'>IR</b>:6技術(shù)

    艾邁斯歐司朗推出IR:6紅外LED芯片技術(shù)

    近日,全球光學(xué)解決方案的領(lǐng)軍企業(yè)艾邁斯歐司朗宣布,成功推出最新的IR:6紅外(IRLED芯片技術(shù)。這一技術(shù)的問世,標(biāo)志著艾邁斯歐司朗在紅外LED領(lǐng)域又邁出了堅實(shí)的一步。
    的頭像 發(fā)表于 11-12 15:12 ?935次閱讀

    艾邁斯歐司朗發(fā)布紅外LED新品,搭載全新IR:6技術(shù),助力提升安防與生物識別應(yīng)用效率

    全新IR:6薄膜紅外LED芯片技術(shù),提供850nm、940nm及新增920nm波長選項(xiàng); OSLON? P1616與OSLON? Black系列是首批采用IR:6技術(shù)的產(chǎn)品,為客戶提供直接替換方案
    發(fā)表于 11-08 17:31 ?514次閱讀
    艾邁斯歐司朗發(fā)布紅外<b class='flag-5'>LED</b>新品,搭載全新<b class='flag-5'>IR</b>:6技術(shù),助力提升安防與生物識別應(yīng)用效率

    愛普生SG2520CAA晶振用于汽車音響控制器應(yīng)用

    隨著汽車電子技術(shù)的迅猛發(fā)展,車載音響系統(tǒng)的性能和可靠性成為車主關(guān)注的焦點(diǎn)。為了提供更精準(zhǔn)的聲音體驗(yàn)和更穩(wěn)定的系統(tǒng)性能,愛普生SG2520CAA晶振(型號:X1G005951001916) 則是
    發(fā)表于 10-22 15:26 ?0次下載

    TAS5731采樣率改為16k的時候,就沒有聲音了,為什么?

    音響上面使用ti的TAS5731功放芯片,48k采樣率是可以正常工作的,改為16k采樣率的時候,就沒有聲音,麻煩幫忙分析 i2s master 配置: mclk=12.288M bclk=1.024M 采集率:16khz 采樣位數(shù):32bit 數(shù)據(jù)格式:I2S格式
    發(fā)表于 10-17 07:28

    TLV320DAC3100音頻播放偶爾出一聲比正常聲音響聲音是怎么回事?

    板子使用揚(yáng)聲器播放一個按鍵音的時候,偶然出現(xiàn)一聲較正常聲音響亮的聲音,這種情況好像也不叫破音,只是比正常音量大。 在linux執(zhí)行以下命令,大概20-30次里面就會出現(xiàn)一個比正常響亮的聲音
    發(fā)表于 10-10 06:38

    峰值電流模式降壓LED驅(qū)動器應(yīng)用的環(huán)路響應(yīng)考慮

    電子發(fā)燒友網(wǎng)站提供《峰值電流模式降壓LED驅(qū)動器應(yīng)用的環(huán)路響應(yīng)考慮.pdf》資料免費(fèi)下載
    發(fā)表于 09-25 14:27 ?0次下載
    峰值電流模式降壓<b class='flag-5'>LED</b>驅(qū)動器應(yīng)用的環(huán)路<b class='flag-5'>響應(yīng)</b>考慮

    無線時鐘音響怎么使用

    無線時鐘音響的基本使用方法 1. 準(zhǔn)備工作 設(shè)備檢查 :確保你的無線時鐘音響設(shè)備完好無損,所有配件齊全。 電源 :將音響連接到電源插座,并確保電源適配器與設(shè)備兼容。 2. 設(shè)備設(shè)置 開機(jī) :按下電源
    的頭像 發(fā)表于 09-07 09:14 ?1723次閱讀

    簡述功放和音響的區(qū)別

    功放和音響在音頻系統(tǒng)中扮演著不同的角色,它們之間存在著明顯的區(qū)別。以下將從本質(zhì)、配套設(shè)備、功能、實(shí)用性、價格等多個方面詳細(xì)闡述功放和音響的區(qū)別。
    的頭像 發(fā)表于 08-22 11:46 ?4330次閱讀

    音響后殼氣密性檢測儀的檢測流程是什么

    隨著科技的進(jìn)步和消費(fèi)者對音質(zhì)要求的不斷提升,音響產(chǎn)品的氣密性成為衡量其品質(zhì)的重要指標(biāo)之一。音響后殼的氣密性不僅影響著聲音的傳播和音質(zhì)表現(xiàn),還直接關(guān)系到產(chǎn)品的耐用性和使用壽命。因此,采用專業(yè)的氣密性
    的頭像 發(fā)表于 08-12 13:43 ?603次閱讀
    <b class='flag-5'>音響</b>后殼氣密性檢測儀的檢測流程是什么

    IR615S WDS的配置過程

    針對IR600S設(shè)備WIFI功能無線橋接應(yīng)用配置文檔準(zhǔn)備兩臺IR615s路由器,一臺IR615s做AP設(shè)備,另一臺IR615S做WDS橋接設(shè)備,進(jìn)入
    發(fā)表于 07-26 07:55

    請問IR600/IR700/IR900系列路由器的恢復(fù)出廠設(shè)置分別是如何操作的?

    請問IR600系列路由器、IR700系列路由器、IR900系列路由器的恢復(fù)出廠設(shè)置分別是如何操作的?
    發(fā)表于 07-25 08:00

    IR915和IR615建立IPsec VPN實(shí)現(xiàn)子網(wǎng)互通

    說明:IR915作為server,IR615作為client。 IR615的LAN口IP為:10.173.35.1 IR915連接WiFi,獲取到的IP為:10.5.83.140,LA
    發(fā)表于 07-24 07:26