The SpreadSheet at the following link will show you which pins on the BB
Black can be set for PWM.

https://docs.google.com/spreadsheets/d/1fE-AsDZvJ-bBwzNBj1_sPDrutvEvsmARqFwvbw_HkrE/edit#gid=1518010293

As far as the Adafruit BBIO libs, have you gone through the example at the
Adafruit site?
https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/pwm

If this is not working, could you provide any errors or output of the issue
you are seeing?

The output of the following might be helpful:
*   /opt/scripts/tools/version.sh*

Cheers,

Jon


On Thu, Jan 14, 2021 at 4:42 PM Steve Lentz <[email protected]> wrote:

> Black.  BeagleBoard.org Debian Buster IoT Image 2020-04-06.
>
> FWIW, the Adafruit libraries let me control the pins as GPIO.
>
>
> TY,
> -Steve
>
> On Jan 14, 2021, at 7:02 PM, jonnymo <[email protected]> wrote:
>
> Which BeagleBoard are you using?
>
> Jon
>
> On Thu, Jan 14, 2021 at 2:51 PM [email protected] <[email protected]>
> wrote:
>
>> OK, I want to generate a PWM signal to send to a motor controller.  This
>> is simply to communicate the desired speed, the motor controller will do
>> all the heavy lifting.
>>
>> Unfortunately, the Adafruit_BBIO libraries appear broken and bonescript
>> doesn't seem any better.
>>
>> After digging through Google results I found myself in /sys/class/pwm/
>> using echo to write values into various files and through pure dumb luck
>> was able to get a 2 Khz square wave up on a scope and change its duty
>> cycle.  So at least my set up seems to be working at some level.
>>
>> However, I feel I am missing a bunch of information. Which pwmchip
>> exports to which pwm-X:X and corresponds to which pin?  "duty_cycle" is not
>> really duty cycle, it is nanoseconds high.  I can't change the period, even
>> to sensible values like 250000 or 1000000.  Some of the information on
>> Stack Exchange is worrying, will pwm-4:0 always correspond to P9_14 or can
>> this change on boot?
>>
>> Is there a way to restore the functionality of the Adafruit BBIO
>> libraries, short of waiting for an update?  I did pip3 install -U.
>> Requirement already satisfied: Adafruit_BBIO in
>> /usr/local/lib/python3.7/dist-packages (1.2.0)
>>
>> If that's not possible, is there any documentation on how the
>> /sys/class/pwm is intended to function?
>>
>> Thank you,
>> -Steve Lentz
>>
>> --
>> 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/08130fba-0f75-464a-9041-d66a1c3a8cacn%40googlegroups.com
>> <https://groups.google.com/d/msgid/beagleboard/08130fba-0f75-464a-9041-d66a1c3a8cacn%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>
> --
> 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/CAG99bkoUYXmrUU%2BwtoQnXTYAd3Uq6SAXsTFskbZ-75%2ByvAX3eQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/beagleboard/CAG99bkoUYXmrUU%2BwtoQnXTYAd3Uq6SAXsTFskbZ-75%2ByvAX3eQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>
>
> --
> 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/44AF4518-7FEA-4331-9E61-5D442D484D20%40gmail.com
> <https://groups.google.com/d/msgid/beagleboard/44AF4518-7FEA-4331-9E61-5D442D484D20%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAG99bkr3Uo18Mx57p-m2ec2bfi0A%2BKjYMJYNb-bd5sMfKNpRzg%40mail.gmail.com.

Reply via email to