Project 3

You need to call analogRead(), not digitalRead(). This is explained on p. 46, the paragraph second to the bottom of the page.

digitalRead will only check if the pin is high/low, whilst analogRead represents the voltage of the pin with a scale from 0 to 1023.