//initialises the code when to power up or reset
void setup()
{
//initialises the serial coms at 9600 bit per second
Serial.begin(9600);
}
//the loop routine runs over and over forever
void loop()
{
//read the input from analog pin A0
int sensorValue = analogRead(A0);
//Convert the analog voltage reading (A/D 0-1023) to a voltage (0-5V)
//print out value you read on serial monitor
Serial.println(sensorValue);
delay(10); //delay in between reads for stability
}