Skip to content

Commit

Permalink
Encender un LED por LDR
Browse files Browse the repository at this point in the history
  • Loading branch information
agomezgar committed Jan 27, 2016
1 parent 439aa5c commit d1c7b45
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 2,656 deletions.
17 changes: 17 additions & 0 deletions LEDAutomatico/LEDAutomatico/LEDAutomatico.ino
@@ -0,0 +1,17 @@
int lectura;
int led=8;
void setup() {
Serial.begin(9600);
pinMode(led,OUTPUT);
}

void loop() {
lectura=analogRead(A0);
if (lectura>700){
digitalWrite(led,HIGH);
}else{
digitalWrite(led,LOW);
}

delay(100);
}
Binary file added LEDAutomatico/esquemaConexiones.fzz
Binary file not shown.
Binary file added LEDAutomatico/esquemaConexiones.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions LEDAutomatico/lecturaMonitorSerial/lecturaMonitorSerial.ino
@@ -0,0 +1,13 @@
int lectura;

void setup() {
Serial.begin(9600);

}

void loop() {
lectura=analogRead(A0);
Serial.println(lectura);

delay(100);
}

0 comments on commit d1c7b45

Please sign in to comment.