Closed deelerke closed 3 years ago
@deelerke could you please either pull the latest commit or just edit that line and let me know if it works for you?
hi pdp7 , that looks really promising! sorry for the delays, I'm in Belgian timezone
I did a fresh install with the Linux beaglebone 4.19.94-ti-r57 image, and did a git clone git://github.com/adafruit/adafruit-beaglebone-io-python.git and then edited that line pwm_path[66] -> pwm_path[67] and a "python3 setup.py install" and tried the pwm-test again
root@beaglebone:/home/debian/adafruit-beaglebone-io-python# python3 pwm-test.py
Traceback (most recent call last):
File "pwm-test.py", line 1, in <module>
import Adafruit_BBIO.PWM as pwm
ModuleNotFoundError: No module named 'Adafruit_BBIO.PWM'
root@beaglebone:/home/debian/adafruit-beaglebone-io-python# cat pwm-test.py
import Adafruit_BBIO.PWM as pwm
pwm.start("P9_42",50);
pwm.stop("P9_42");
I haven't installed anything yet via pip3, but it seems like I must be missing something very trivial and silly. Or does the module have a different name now? thanks !
@deelerke hmm, that is weird. have you tried moving the script to your home the directory and running again?
Instead of entering root shell, you also might want to run "sudo python3 ./setup install" and then "sudo python3 ./pwm-test.py". I don't normally run in a root shell. I don't think it should be a problem but there might be something going on with the environment variables.
Side note: I forgot to actually merge my pull request with the fix so I have done that now. https://github.com/adafruit/adafruit-beaglebone-io-python/commit/7361d9a997bce4ab79c83c4ef30442e8dd13f363
Here what it looks like for me:
debian@beaglebone:~$ cd adafruit-beaglebone-io-python/
debian@beaglebone:~/adafruit-beaglebone-io-python$ sudo python3 ./setup.py install
debian@beaglebone:~$ cat pwm-test.py
import Adafruit_BBIO.PWM as pwm
pwm.start("P9_42",50);
pwm.stop("P9_42");
debian@beaglebone:~$ sudo python3 pwm-test.py
It completes with no error.
Just to make sure there were no unintended changes, what does git diff
and git status
show inside of adafruit-beaglebone-io-python
?
allright!!!!! moving to the home dir fixed it and NO ERRORS !!! :) :) I'll check tonight if I got an actual PWM signal on the pin. but no doubt about it.
fantastic work pdp7 !!!!!
yes! pwm signal confirmed!
thanks again for your efforts on this!
@deelerke thanks for testing. I'm glad we finally got this one solved.
Same issue here on the latest BBB image and latest version (built from most recent git update) of the adafruit library. Running BeagleBoard.org Debian Bullseye IoT Image 2023-09-02
debian@BeagleBone:~$ sudo python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
'>>> import Adafruit_BBIO.PWM as PWM
'>>> PWM.start("P9_14",5,50)
Traceback (most recent call last):
File "
Hi, I'm trying to get this working on a Beaglebone Green with Debian Buster (Linux beaglebone 5.4.38-ti-r8)
and this is my /boot/uEnv.txt
thanks in advance for your suggestions
Dieter