Yeah, the code I wrote was Javascript. Basically I created a sysfs bit of
wrapper code in Javascript for Nodejs on the Beaglebone.

I'll probably be adding it to my Bonejs project on github. If you care to
look at it for reference.  But I need to write a readme.md for it first,
and I've no idea how long that will take. Lots of stuff to do, and not
enough time to do it all.

On Wed, Jul 27, 2016 at 5:43 AM, William Hermans <[email protected]> wrote:

> heh, sorry the link .  .
> https://briancode.wordpress.com/2015/01/06/working-with-pwm-on-a-beaglebone-black/
>
> On Wed, Jul 27, 2016 at 5:42 AM, William Hermans <[email protected]>
> wrote:
>
>>
>>>    - you say that I still have to manually export pwm0 and pwm1. You
>>>    mean after mounting your cape, I will have to write a 0 and 1 into the
>>>    export file of the pwmchip<number> directories in /sys/class/pwm?
>>>
>>> Yes.
>>
>>    - Also which Chip corresponds to which ehrpwm?
>>
>> This site has a table most of the way down that explains it. However do
>> keep in mind that it's outdated material, and that now we only have pwm0,
>> and pwm 1 per module. No, pwm0, pwm1, pwm2, pwm3, etc. Also the pwm
>> directories will no longer show in /sys/class/pwm, but will now show in
>> /sys/class/pwm/pwmchipX where X is the chip number.
>>
>>    - And last but not least, what is the unit of duty_cycle and period?
>>    Is it ns?
>>
>> I'm not 100% sure, but ns sounds reasonable. However, I'm not sure the
>> time period matters so much, as duty_cycle is a percentage of period. So in
>> our circuit here, which is reverse logic. A period of 2000 with a
>> duty_cycle of 2000 would be 100% duty_cycle. BUt I was just driving LEDs
>> with it, not a stepper motor or anything period critical.
>>
>> Anyway, you can always hook the output up to a scope . . .
>>
>
>

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CALHSORoGPW0AeR7wBmKnDOCd1Cxg8OrP6UD%3DkH9hZ2jXHgGoow%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to