// serial.txt on E4D website // analogRead, Serial.begin, Serial.print, Serial.println int sensorVal = 0; int sensorPin = A0; void setup ( ) { Serial.begin (9600); // Initialize the Serial Port pinMode(sensorPin, INPUT); } void loop ( ) { sensorVal = analogRead(sensorPin); // get reading Serial.print (“voltage = “); // print inline: text Serial.print (sensorVal*10); // print inline: reading times ten Serial.println (“ millivolts“); // print text, send carriage return/line feed = next line delay(100); } /* After uploading: Open Serial Monitor on IDE You should see the onboard BLUE TX LED flashing on each ‘analogRead’ and then see the value of the potentiometer's A0 voltage value on the screen. NOTE: With a 10K pull-up resistor the output needs to multiplied by 10 to indicate voltage at input A0 in millivolts: 2590 mV = 2.59 Volts, etc. */