bluehash 1,581 Posted May 13, 2013 Share Posted May 13, 2013 Again, from the quadrotor diaries - A simple c++ class for the PWM sub-system. The A8 on the beaglebone has three pwm blocks with 2 pwm outputs each. The code encapsulates one block for two PWMs, bringing the total to 6 PWMs.Github link.Usage: #include "cPWM.h" cPWM::cPWM* pwmout; main() { //the 2 is because we're gonna use eHRPWM2 pwmout = new cPWM::cPWM(2); //Period in ns. 20000000ns = 20ms pwmout->Period(20000000); //DutyA sets the duty for eHRPWMnA to 1ms pwmout->DutyA(1000000); //go eHRPWM2A !!! pwmout->RunA(); return 0; } Quote Link to post Share on other sites
yyrkoon 250 Posted May 13, 2013 Share Posted May 13, 2013 @@bluehash Maybe we should have a links post like on 43oh ? I was thinking about that already this morning. BUt maybe you should make it so you could sticky it too ? Quote Link to post Share on other sites
bluehash 1,581 Posted May 13, 2013 Author Share Posted May 13, 2013 @@bluehash Maybe we should have a links post like on 43oh ? I was thinking about that already this morning. BUt maybe you should make it so you could sticky it too ? Links as in? Sorry I don't understand. Edit: you mean helpful links? Looks like you started it. I can sticky it up. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.