Beruflich Dokumente
Kultur Dokumente
const int significa que LED es un nmero entero que no puede ser cambiado
(como por ejemplo una constante) cuyo valor est enclavado a 13 para este
caso. Le dice a Arduino que escriba el nmero 13 cada vez que la palabra
LED aparezca. Usamos este comando para especfica que el LED que estar
parpadeando est conectado a Arduino en el pin 13.
void setup
Void loop()
Delay(1000);
Arduino has a very basic structure. Therefore, if you want things to happen
with a certain regularity, you tell it to sit quietly and do nothing until it is
time to go to the next step. delay () basically makes the processor sit there
and do nothing for the amount of milliseconds that you pass as an
argument. Milliseconds are thousandths; therefore, 1000 miliseconds equals
1 second. So the LED stays on for one second here.
This instruction now turns of the LED that we previously turned on. Why do
we use HIGH and LOW? Well, it is an old convention in digital electronics.
HIGH means that the pin is on, and in the case ARDUINO, it will be set at 5v.
LOW means 0v. You can also replace these arguments mentally with ON and
OFF.
Here, we delay for another second. The LED will be of for ones second.