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.
