A2 doesn't match pin when INPUT_PULLUP
lunaoe opened this issue · comments
pinMode(A2, INPUT_PULLUP);
doesn't work.
- Why can't the definitions be changed in pins_arduino.h?
- Does this mean the pinout diagram is wrong?
You can only use analog pin definitions when using analogRead. Use pinMode(4, INPUT_PULLUP); instead
The reason why is because analog and digital pins doesn't line up, so a compromise has to be made.
I'm using an enum to refer to analog pins. I'm doing this because it throws an error if you don't use an analog pin definition (for instance A2) with analogRead. There is nothing wrong with the pinout