Cintillo Institucional

wiki comunidad

Proyecto Hardware Libre Cenditel

Página Cenditel

wiki Cenditel

Plataforma de Desarrollo Colaborativo

Curso Sensibilización Hardware Libre (Unidad 002)

logohl.png logohl.png logohl.png

002/02 Actividad 002



 // The Arduino code.

#define ANALOG_IN 0
int ledPin = 13;                // LED connected to digital pin 13

void setup() {
  Serial.begin(9600);
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop() {
  int val = analogRead(ANALOG_IN);
  val=val/4;
  Serial.print( 0xff, BYTE);
  Serial.print( (val >> 8) & 0xff, BYTE);
  Serial.print( val & 0xff, BYTE);

/*  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
*/
}