// Professor: Christian Bodington E. // www.conexionelectronica.com // Exercise # 1-4: Handling I/O ports. int sensorPin = A0; // select the input pin for the potentiometer int sensorValue = 0; // variable to store the value coming from the sensor void setup() { // Initialize the digital pins as an output. DDRD = B11111111; // sets Arduino pins 0 to 7 as outputs } // the loop routine runs over and over again forever: void loop() { // read the value from the sensor: sensorValue = analogRead(sensorPin); PORTD = sensorValue; delay(1000); }