Analog -> Digital pin outs? Same as Mega?

Started by gregcope, November 01, 2019, 12:41:24 PM

gregcope

Hi,

I need a few more digital pins!

Does the M0 follow the Mega pin out map for example

A0 -> D24
A3 -> D27
A4 -> D28

etc..?

Felix

If you look in variants.h in the moteino samd\_version_\variants\moteino_zero you will find the following mapping:

/*
* Analog pins
*/
#define PIN_A0               (14ul)
#define PIN_A1               (15ul)
#define PIN_A2               (16ul)
#define PIN_A3               (17ul)
#define PIN_A4               (18ul)
#define PIN_A5               (19ul)
#define PIN_DAC0             (14ul)

Where the numbers are actual digital pin numbers. So 14ul is D14 or A0.