Go Down

Topic: Rewrite variant.cpp for pin PC20 to become digital pin (Read 379 times) previous topic - next topic

castfxman

Hello,

I have a Arduino DUE based PCB which uses a pin on the SAM3X8E chip which does not get used on the regular DUE.  I am trying to control a stepper motor with Physical Pin 131 or PC20 (which is the SAM3X pin name)  I have rewritten the variant.cpp file in the hardware/cores/sam section of the arduino IDE to make existing pins point to different numbers and I have seen boards take advantage of PC20.  Boards such as the TAIJUINO and the DIGIX made by Digistump.  Simple coping those variant files and calling out the pins they mapped in my sketch does not drive the motor but doesn't receive any errors either.  I don't want to have to reprint the board and use a different pin and would rather use pin PC20 in the firmware.  Has anyone done this with just one pin?

dzfan

Can you show us the variant.cpp file before and after the change you made?

Go Up