7. void setup( ){
_______________ ;
_______________ ;
_______________ ;
}
void loop ( ) {
______________ ;
______________ ;
______________ ;
}
sentencias
Una vez
Se repite
8. Estructuras de control
for (inicialización, condición, incremento){
sentencias
}
for ( int i = 0; i<255; i =i+1) {
analogwrite (Led , i );
delay (100);
}
20. buzzer
tone ()
genera una frecuencia determinada
por una cantidad de tiempo en un pin.
Sintaxis:
tone (PIN, frecuencia);
tone (PIN, frecuencia, tiempo);
Ejemplo
tone (12, 432, 3000);
21. Otra forma de introducir variables
Array (arreglo – vector)
int numbers[] = { 10, 25, 50 };
Serial.println (numbers[0]); // imprime el primer valor, 10
Serial.println (numbers[1]); // imprime el primer valor, 25
Serial.println (numbers[2]); // imprime el primer valor, 50
Los valores se indexan desde 0