Jump to content

PWM C++ class for the BeagleBone

Recommended Posts

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.


#include "cPWM.h"

cPWM::cPWM* pwmout;

//the 2 is because we're gonna use eHRPWM2
pwmout = new cPWM::cPWM(2);
//Period in ns. 20000000ns = 20ms
//DutyA sets the duty for eHRPWMnA to 1ms
//go eHRPWM2A !!!
return 0;
Link to post
Share on other sites

@@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.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...