Arduino Stuff

May 3, 2016


UPDATE May 4, 2016:  I now have an Adafruit M0 feather with WiFi.  I discovered  there is no digital Pin 2 on this board.  Only pin 5.  So, did not work with the M0 feather.  I modified the code to use analog pins A1 & A2 so now it works fine on the Feather WiFi as well as Sparkfun SAMD21 and Arduino Zero.

Fast PWM for ARM M0 SAMD21 boards

Recently several Arduino boards based on the 32 bit ARM Cortex M0 SAMD21 chips have become available.  The Arduino Zero, Sparkfun SAMD21 and Adafruit Feather M0 are three examples.  They have 48 mhz clocks and lots of RAM and program memory.  They are pretty awesome.  Many of my projects need pwm motor control but I was unable to find a pwm library suitable for driving h-bridges in the 10 to 50 kHz range. So I wrote my own.  

The library is M0motorPWM.zip.  It only works on the SAMD21 boards.  It outputs 2 independent pwm channels on analog pins A1 and A2.   Click here to download M0motorPWM.zip . (version 0.2)

 

 

 

 

 Hit Counter = 2352