Bug is the sketch Tuturial/Calibration

OOPs sorry, wrong forum, this is hardware :o

I just started learning the programming language, so correct me if I'm being stupid.

in arduino.cc/en/Tutorial/Calibration schematic and wiring diagram

resistor voltage divider is connected to analogue 0 (pin 23/ADC0)

the sketch contains the line:

const int sensorPin = 2; // pin that the sensor is attached to

this seems to be an error

Agreed -- this really ought to be fixed.

It's probably easier to change the code rather than the diagram. I'm guessing that the original author had working code that was cut-and-pasted and neglected to change the constant to reflect the artwork.


I just started learning the programming language