// Cal-Eng StealthDuino! Leonardo analog input example // Outputs a A/D voltage value of the light sensor's reading of reflected // or ambient light to USB VCP using the Serial Monitor window // Note that the USB serial VCP is seperate from the hardware serial // port on the ATmega32U4 void setup() { Serial.begin(9600); pinMode(3, INPUT); pinMode(13, OUTPUT); } void loop() { digitalWrite(13, HIGH); // set the LED on int sensorValue = analogRead(A5); String textString = "Analog input 5 value is: "; String outputString = textString + sensorValue; Serial.println(outputString); delay(1000); // Delay another second, then toggle D13 LED delay(1000); digitalWrite(13, LOW); // turn the LED off delay(1000); }