Tabla de contenido:

Idea de proyecto de arte inventivo de bricolaje con luces LED y sonido: 3 pasos
Idea de proyecto de arte inventivo de bricolaje con luces LED y sonido: 3 pasos

Video: Idea de proyecto de arte inventivo de bricolaje con luces LED y sonido: 3 pasos

Video: Idea de proyecto de arte inventivo de bricolaje con luces LED y sonido: 3 pasos
Video: Misioneros de la Luz - Médium CHICO XAVIER - Por el Espíritu André Luiz. 2024, Mes de julio
Anonim
Idea de proyecto de ARTE inventivo de bricolaje con luces LED y sonido
Idea de proyecto de ARTE inventivo de bricolaje con luces LED y sonido

En este video te mostraré cómo hacer un proyecto de arte único en casa usando tira de LED y sonido.

Paso 1: Video del proyecto

Image
Image

Tira de LED:

Reproductor de MP3:

Sensor de infrarrojos:

Microcontrolador -

Conector -

Adaptador -

Regulador de voltaje -

Ponente:

Micro SD:

Condensador -

Resistencia -

Interruptor de palanca:

Herramientas de soldadura:

Paso 2: esquema y Gerber

Schematic y Gerber
Schematic y Gerber

Obtenga el tablero:

Paso 3: código fuente

Código fuente
Código fuente

Código fuente:

#incluir

#incluir "SoftwareSerial.h" #incluir "DFRobotDFPlayerMini.h" #define NUM_LEDS_PER_STRIP 70 #define BRIGHTNESS 200 #define LED1pin 5 #define LED2pin 6 #define LED3pin 7 const int IR1pin = A0; const int IR2pin = A1; const int IR3pin = A2; CRGB LED1color [NUM_LEDS_PER_STRIP]; CRGB LED2color [NUM_LEDS_PER_STRIP]; CRGB LED3color [NUM_LEDS_PER_STRIP]; SoftwareSerial mySoftwareSerial (10, 11); // RX, TX DFRobotDFPlayerMini myDFPlayer; printDetail vacío (tipo uint8_t, valor int); configuración vacía () {mySoftwareSerial.begin (9600); Serial.begin (115200); if (! myDFPlayer.begin (mySoftwareSerial)) {Serial.println (F ("No se puede comenzar:")); Serial.println (F ("1. ¡Vuelva a comprobar la conexión!")); Serial.println (F ("2. Inserte la tarjeta SD!")); mientras (verdadero); } pinMode (IR1pin, ENTRADA); pinMode (IR2pin, ENTRADA); pinMode (IR3pin, ENTRADA); myDFPlayer.volume (20); myDFPlayer. EQ (DFPLAYER_EQ_CLASSIC); myDFPlayer.outputDevice (DFPLAYER_DEVICE_SD); FastLED.addLeds (LED1color, NUM_LEDS_PER_STRIP); FastLED.addLeds (LED2color, NUM_LEDS_PER_STRIP); FastLED.addLeds (LED3color, NUM_LEDS_PER_STRIP); FastLED.setBrightness (BRILLO); } bucle vacío () {if (digitalRead (IR1pin) == LOW) {LED1show (); } if (digitalRead (IR2pin) == BAJO) {LED2show (); } if (digitalRead (IR3pin) == BAJO) {LED3show (); }} void LED1show () {myDFPlayer.play (1); para (int i = 0; i = 0; i--) {LED1color = CRGB:: Verde; FastLED.show (); LED1color = CRGB:: Negro; retraso (100); } myDFPlayer.pause (); } void LED2show () {myDFPlayer.play (2); para (int i = 0; i = 0; i--) {LED2color = CRGB:: Verde; FastLED.show (); LED2color = CRGB:: Negro; retraso (100); } myDFPlayer.pause (); } void LED3show () {myDFPlayer.play (3); para (int i = 0; i = 0; i--) {LED3color = CRGB:: Verde; FastLED.show (); LED3color = CRGB:: Negro; retraso (100); } myDFPlayer.pause (); }

Recomendado: