;+++++++++++++++++++++++++++++++++++++++
;+++++++++++++++++++++++++++++++++++++++
int LDR=A5; //SENSOR DE LUZ
#define LED 13
void
setup() {
  // put your setup code here, to run once:
  pinMode(LED,OUTPUT);  //LED EN PIN 13
  Serial.begin(9600);   //COMUNICACION CON LA PC
}
void loop()
{
  // put your main code here, to run repeatedly:
  Serial.println(analogRead(LDR)); //LEER
SENSOR LDR
  digitalWrite(LED,!digitalRead(LED));//TOGGLE
PIN 13
  delay(1000);
}
;+++++++++++++++++++++++++++++++++++++++
;+++++++++++++++++++++++++++++++++++++++
Les deseo mucho éxito
y sigamos programando!!!

No hay comentarios.:
Publicar un comentario