Arduino M0 PRO digital signals reversed?

I use a brandnew M0 PRO with a problem at the both digital inputs 2 and 4: They are reversed! My first intention with input 2: it is defekt, but then I saw that it works when I define it as input 4 in the sketch. The physical input 4 works with number 2 in software. All other digital signals Looks OK.

Is this a kown behaviour? It must be part of the samd Software!?

Yes, it was carefully designed by the warring Italians to ensure that neither the M0 Pro nor the Zero will ever be successful.

I have an M0 Pro and use v1.6.x of the IDE. I just added an entry for M0 Pro to the "boards.txt" and a conditional to the "variant.cpp"

One day the Italians will have thrown everything out of their prams. And we might get a single IDE which supports both current boards. And future production is of a SINGLE board.

I do not mind which board wins. Just that we get a SINGLE board.


Historically, all '168 & '328 AVR-based Arduino have interrupts on pins 2 and 3. Many sketches, shields and tutorials are all designed around using those pins with attachInterrupt(). Most commonly pin 2 is used, perhaps because it’s the first, perhaps because pin 3 has PWM. Mega was designed with interrupts on those pins, and of course Due supports interrupts on all pins. So basically, all boards have supported pin 2 as an interrupt.

Most likely during the lengthy beta test for Zero, after Smart Projects had broken off and released their own board based on the early beta (and buggy code), realized the only pin which can’t support interrupts had been assigned as pin 2. They did spend quite a long time on the beta test, and many criticized the product’s lateness. released their Zero Pro early, and later renamed to M0 & M0 Pro, but the code was terribly buggy early beta test code they’d copied while they still had access to’s beta test site. It’s easy to take all this for granted now, but basically released the early beta with little or no improvements, while indeed put a lot of work into testing and revising and releasing a well tested product with good code.

They almost certainly swapped those pins later in the beta test, for compatibility with shields and examples using pin 2 as an interrupt. But if you really want to believe Massimo Banzi personally rerouted those pins just to spite Federico Musto, then go right ahead. Conspiracy theories are fun!