Is it possible to query the pin-out and each pin's attributes at run-time with Arduino?
If not, can it be done at compile-time?
Finally, if not, how can I incorporate this kind of information into my project to avoid completely rewriting my program for each possible Arduino model?
I am looking for something like this:
PinProperties props= getPinProperties(pinNumber); props.supportsDigitalInput(); props.supportsDigitalOutput(); props.supportsAnalogInput(); props.supportsAnalogOutput(); props.supportsPWM(); props.analogInputBits(); props.analogOutputBits(); props.pullupResistance(); props.pulldownResistance();
NOTE: This question is similar and I might use the board model to look up a pre-stored pin-out.