Arduino Led Blink

de George Sand


Adaugat in 2017-03-07 01:54:26



In acest exemplu vom arata cum sa facem un LED sa palpaie.

Vom avea nevoie de urmatoarele:

  • o placa Arduino UNO disponibila AICI
  • un LED de maxim 3V
  • o rezistena de 220 Ohm

Codu sursa aferent:


// the setup function runs once when you press reset or power the board
voidsetup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN,OUTPUT)
}

// the loop function runs over and over again forever
voidloop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}


Tag-uri cautare led blink led blink Arduino Led Blink arduino
Trimite unui prieten aceasta postare
sau distribuie postarea la tine pe perete
Inapoi

Lasa un comentariu