sábado, 18 de julio de 2015

Arduino [buttons led / boton led ] 02

Arduino [buttons led / boton led ] 02

circuito usando fritzing

//variable estado
int estado = 0;

void setup() {
  // put your setup code here, to run once:
  pinMode(8, INPUT); // pin 8 de entrada input
  pinMode(4, OUTPUT);//pin 4 salida
}

void loop() {
  // put your main code here, to run repeatedly:
  estado = digitalRead(8);
 
  if(estado == HIGH){
    digitalWrite(4, HIGH);
  }
  else{
    digitalWrite(4, LOW);
  }
}



Related Posts:

  • Clifford Stoll Clifford Stoll    [English] Clifford Paul "Cliff" Stoll (born June 4, 1950) is an American astronomer, author and teacher. He is best known for his investigation in 1986, while working as a systems administrat… Read More
  • Alternativa a Photoshop - Gimp Linux Alternativa a Photoshop - Gimp Linux Instalación gimp 2.6: $ sudo apt-get install gimp $ sudo apt-get install gimp-help-es Instalación gimp 2.8: $ sudo add-apt-repository ppa:otto-kesselgulasch/gimp $ sudo ap… Read More
  • configurar el teclado linux Configuración de la entrada del teclado Buenos días, ya hace un tiempo llevo cambiando el idioma de entrada del teclado por medio del comando que les deje hace un tiempo. Hoy les traigo una solución para no tener que con… Read More
  • Sqlite Browser and single table Sqlite Browser Comand to Install sudo add-apt-repository ppa:linuxgndu/sqlitebrowsersudo apt-get updatesudo apt-get install sqlitebrowser CREATE TABLE Users (    name VARCHAR (128),    e… Read More
  • El hijo que supero al padre? / the son surpassed the father?El hijo que supero al padre? / the son surpassed the father? … Read More

0 comentarios:

Publicar un comentario