Support for Arduino leonardo (ATmega32u4)

I have an Arduino Leonardo board, which uses ATmega32u4 as same as Arduino pro micro. And I tested the open-loop velocity control example on the board and found that the motor could rotate smoothly but generate huge noise at the same time.
I realize it may be due to subtle differences caused by different chips.

Should I create an issue in Github or pull a request directly? @Antun_Skuric

Hey @Axe,

You are right, Leonard is not supported at the moment. I have planed to support it for some time now. It is just a question of the _pinHighFrequency function.
If you would be in to contribute I’d be very happy to help. Otherwise you can just post here the modifs that you’ve done and I’ll do the rest :smiley:

Hey Axe, I’ve used your code and merged it to the dev branch. Also I’ve added the 6pwm support for the leonardo.
If you have some time to test it ti would be really great :smiley: