Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Esto es un ejemplo de un comentario en BLOQUE.
- This is an example of a BLOCK comment.
- */
- void setup() {
- //Esto es un ejemplo de un comentario en LÍNEA.
- //This is an example of a LINE comment
- /*
- La instrucción Serial.begin(9600);
- Prepara y activa el puerto serial a una razón de 9600 bauds por segundo.
- Instruction Serial.begin(9600);
- Initialize serial communication at 9600 bauds per second:
- */
- Serial.begin(9600);
- }
- // La rutina recursiva continuará "corriendo"
- // the loop routine runs over and over again forever:
- void loop() {
- /*
- ¡AQUI OCURRE UNA ENTRADA!
- int sensorValue: Declara una variable llamada sensorValue.
- Esta variable (sensorValue) se declara como un número ENTERO (int)
- int sensorValue = analogRead(A0): le asigna a la variable sensorValue
- el valor que se obtiene a través del pin analogo "0"
- AN INPUT IS HAPPENING HERE!
- int sensorValue: Declares a variable called sensorValue.
- This variable is DECLARE and INITIALIZE as an INTEGER (int) number.
- int sensorValue = analogRead(A0): Asigns the value read by the analog pin 0 (A0) to the variable (sensorValue)
- */
- int sensorValue = analogRead(A0);
- /*
- ¡AQUI OCURRE UNA SALIDA!
- Serial.println(sensorValue): Devuelve el valor de la variable (sensorValue).
- AN OUTPUT IS HAPPENING HERE!
- Serial.println(sensorValue): Returns the value of the variable(sensorValue)
- */
- Serial.println(sensorValue);
- delay(10); // tiempo (en segundos) entre cada lectura del "pin"
- // time (in seconds) between each reading
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement