fredericplante / sanguino

Automatically exported from code.google.com/p/sanguino
0 stars 0 forks source link

NUM_DIGITAL_PINS in pins_arduino.h does not include analog pins #36

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
pins_arduino.h contains:

#define NUM_DIGITAL_PINS            24
#define NUM_ANALOG_INPUTS           8

However, there are really 32 digital pins available (i.e., pins that can be 
manipulated with digitalRead/digitalWrite), of which 8 _also_ support analog 
input. AFAIU excluding the "analog" pins from NUM_DIGITAL_PINS because they 
happen to _also_ allow analog input is wrong.

For example, looking at the pins_arduino.h file for the Arduino Uno, which has 
pins D0 - D13 + A0 - A5 for a total of 20 digital pins: 
https://github.com/arduino/Arduino/blob/master/hardware/arduino/variants/standar
d/pins_arduino.h#L30

Original issue reported on code.google.com by matthijskooijman@gmail.com on 31 Jan 2014 at 4:15