Orodha ya maudhui:

Wazo la Mradi wa Uvumbuzi wa DIY na Taa za LED na Sauti: Hatua 3
Wazo la Mradi wa Uvumbuzi wa DIY na Taa za LED na Sauti: Hatua 3

Video: Wazo la Mradi wa Uvumbuzi wa DIY na Taa za LED na Sauti: Hatua 3

Video: Wazo la Mradi wa Uvumbuzi wa DIY na Taa za LED na Sauti: Hatua 3
Video: Электрика в квартире своими руками. Финал. Переделка хрущевки от А до Я. #11 2024, Novemba
Anonim
Wazo la Mradi wa Uvumbuzi wa DIY na Taa za LED na Sauti
Wazo la Mradi wa Uvumbuzi wa DIY na Taa za LED na Sauti

Katika video hii nitakuonyesha jinsi ya kutengeneza mradi wa kipekee wa sanaa nyumbani ukitumia kipande cha LED na sauti.

Hatua ya 1: Video ya Mradi

Image
Image

Ukanda wa LED -

Kicheza MP3 -

Sensorer ya infrared -

Mdhibiti mdogo -

Kiunganishi -

Adapter -

Udhibiti wa Voltage -

Spika -

Micro SD -

Msimamizi -

Mpingaji -

Kubadili kubadili -

Zana za Soldering -

Hatua ya 2: Mpangilio na Gerber

Mpangilio na Gerber
Mpangilio na Gerber

Pata Bodi -

Hatua ya 3: Nambari ya Chanzo

Nambari ya Chanzo
Nambari ya Chanzo

Nambari ya Chanzo:

# pamoja

. const int IR2pin = A1; const int IR3pin = A2; Rangi ya CRGB LED1 [NUM_LEDS_PER_STRIP]; Rangi ya LED ya CRGB [NUM_LEDS_PER_STRIP]; Rangi ya CRGB33 [NUM_LEDS_PER_STRIP]; SoftwareSerial mySoftwareSerial (10, 11); // RX, TX DFRobotDFPlayerMini myDFPlayer; uchapishaji batili Maelezo (aina ya uint8_t, thamani ya int); kuanzisha batili () {mySoftwareSerial.begin (9600); Serial. Kuanza (115200); ikiwa (! myDFPlayer.begin (mySoftwareSerial)) {Serial.println (F ("Haiwezi kuanza:")); Serial.println (F ("1. Tafadhali angalia tena unganisho!")); Serial.println (F ("2. Tafadhali weka kadi ya SD!")); wakati (kweli); } pinMode (IR1pin, INPUT); pinMode (IR2pin, INPUT); pinMode (IR3pin, INPUT); myDFPlayer.volume (20); myDFPlayer. EQ (DFPLAYER_EQ_CLASSIC); myDFPlayer.outputDevice (DFPLAYER_DEVICE_SD); FastLED.addLeds (rangi ya LED1, NUM_LEDS_PER_STRIP); FastLED.addLeds (LED2color, NUM_LEDS_PER_STRIP); FastLED.addLeds (rangi ya LED3, NUM_LEDS_PER_STRIP); FastLED.setBrightness (MWANGA); } kitanzi batili () {if (digitalRead (IR1pin) == LOW) {LED1show (); } ikiwa (digitalRead (IR2pin) == LOW) {LED2show (); } ikiwa (digitalRead (IR3pin) == LOW) {LED3show (); }} batili LED1show () {myDFPlayer.play (1); kwa (int i = 0; i = 0; i--) {LED1color = CRGB:: Kijani; FastLED.show (); Rangi ya LED = CRGB:: Nyeusi; kuchelewesha (100); } myDFPlayer.pause (); } batili LED2show () {myDFPlayer.play (2); kwa (int i = 0; i = 0; i--) {LED2color = CRGB:: Kijani; FastLED.show (); LED2color = CRGB:: Nyeusi; kuchelewesha (100); } myDFPlayer.pause (); } batili LED3show () {myDFPlayer.play (3); kwa (int i = 0; i = 0; i--) {LED3color = CRGB:: Kijani; FastLED.show (); Rangi ya LED3 = CRGB:: Nyeusi; kuchelewesha (100); } myDFPlayer.pause (); }

Ilipendekeza: