const int PHOTORESISTORPIN = A0; // shortcut to refer to the photoresistor pin later void setup() { pinMode(PHOTORESISTORPIN, INPUT); // we will be reading the photoresistor pin as an input Serial.begin(9600); // starts serial communication at 9,600 baud (the rate) } void loop() { int readVal; // initialize a new integer to store the photocell value readVal = analogRead(PHOTORESISTORPIN); // do the analog read and store the value Serial.println(readVal); // push the most recent value to the computer delay(50); // slow the loop down a bit before it repeats }