Temporizador para lámpara con sensor de sonido

Hola amigos, soy nuevo en ésto y quiero que me ayuden.
Estoy haciendo una lampara que se encienda y apague con aplausos o palabras.

Pero quiero que también se apague con temporizador, después de 10 o 20 minutos si no se dan más aplausos o no se dice nada más.

Espero me ayuden.
Muchas gracias.

Welcome! What you want to do has many solutions. Since you posted on the Arduino community I would suggest you get two Arduinos. The reason for two is if something fails you can check it against a known good unit. You will have to do some research on your own but you can do it. There are sound sensors available for the Arduino, many are not very expensive. You will need an interface for the lamp, hopefully if you do not have experience with mains you will have some help. For this I would suggest a relay module, most have a LED that will light when turned on, eliminating the need to connect the lamp until it is working. You can download the Arduino IDE for free but a donation is always appreciated. Your computer will determine which version of the IDE you want. While you are waiting on your Arduino(s) and modules to arrive you can go online and watch several tutorials that are free and will cover the various parts you have chosen. You can also load the IDE and see what is available especially in the examples, when your Arduino(s) arrive try some of them. Happy Computing!

No entiendo a qué apunta tu pedido.

Si es código lo que necesitas vamos mal, te ayudamos a corregir tu código, no lo hacemos por ti.

Si es hardware, hay varias opciones, depende de tu presupuesto, tienes módulos de reconocimiento de voz o sensores de sonido, tienes que decidir tú cual opción usar.

Investiga en la web y, cuando tengas más datos, vemos como seguir.

Saludos

Hola, muchas gracias por responder, tengo dos borradores, uno apaga la lámpara con un Delay. Otro se enciende y apaga con los aplausos.
No se como hacer para integrar los dos y que se apague después de algún tiempo o que se apague luego de escuchar otro apluaso. dejo el código si me pueden ayudar.

LÁMPARA SE ENCIENDE CON APLAUSO Y SE APAGA DESPUES DE 10 SEGUNDOS
int luz=13;
int sensorSonido=2;
int sonido=0;
int var=0;

void setup() {
// put your setup code here, to run once:
Serial.begin (9600);
pinMode (sensorSonido, INPUT);
pinMode (luz,OUTPUT);

}

void loop() {
// put your main code here, to run repeatedly:
var=digitalRead(sensorSonido);
if (var==HIGH){
Serial.println("encendido");
digitalWrite(luz,HIGH);
sonido=sonido+1;
delay (90);
}
if (sonido==2){
Serial.println("apagado");
digitalWrite(luz,LOW);
sonido=0;
delay(10000);
digitalWrite(luz, LOW);
}

}

LAMPARA ENCENDIDO Y APAGADO CON PALMAS
int luz=12;
int sensorSonido=2;
int sonido=0;
int var=0;

void setup() {
// put your setup code here, to run once:
Serial.begin (9600);
pinMode (sensorSonido, INPUT);
pinMode (luz,OUTPUT);

}

void loop() {
// put your main code here, to run repeatedly:
var=digitalRead(sensorSonido);
if (var==HIGH){
Serial.println("encendido");
digitalWrite(luz,HIGH);
sonido=sonido+1;
delay (90);
}
if (sonido==2){
Serial.println("apagado");
digitalWrite(luz,LOW);
sonido=0;
}
}

Moderador:
Por favor, lee las Normas del foro y edita tu códigoi usando etiquetas de código.
Ve a edición, luego selecciona todo el error que has publicado, lo cortas y click en </>


This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.