This is some Servo Cape additions made for the BBB and BBAI-64.
Ideas about Bullseye because Bookworm will need a Virtual Environment for python3 -m pip install smbus2
- Get an image from beagleboard.org for a Debian Bullseye Distro w/ all the fixings.
- Make sure it is the minimal flasher image...
- Here is a location where you can grab the image... a. https://forum.beagleboard.org/t/arm64-debian-11-x-bullseye-monthly-snapshots-2023-10-07/32318
- Look to your smbus2 file called smbus2.py and change line 302.
- The smbus2.py file is located, after installing w/
python3 -m pip install smbus2
, at: a.~/.local/lib/python3/site-packages/smbus2/smbus2.py
- Then, on line 302 in smbus2.py, make sure it is a fd of
/dev/bone/i2c/2
. - If that is not working, try
/dev/i2c-5
. - Add your favorite server and a
/templates/
dir. w/ a file called whatever you wish... - Make sure that pwmsOne.py has the same .html file listed as what you will call the .html file in
/ServoCape/templates/Your_File.html
.
Please use caution while attempting to handle the ServoCape and BeagleBone Black.
There is no excuse for not using safety!
Also...Bookworm has some ideas relating to the OS itself that plays a bit differently compared to Bullseye.
Use a virtual env instead of trying to use outside package managers like pip3 or pip when attempting installs. This means...
- apt install python3-venv
- python3 -m venv Your_FILE
- source Your_FILE/bin/activate
- cd Your_FILE && python3 -m pip install smbus2
- Or...you can use smbus via: apt install python3-smbus
- There are arm64 and armhf ports of python3-smbus for utilization
- Then, try-try-try to make things work via the already acquired docs. here
License: GPL v3 which can be found here: https://www.gnu.org/licenses/gpl-3.0.en.html
Also, I take no responsibility for your endeavors, actions, or your lack of thought out processes.
be careful and stay cautious
If you have not noticed, there is a server, a Flask Server, in the src file to run called pwmsOne.py. That file needs a /templates directory and an HTML file in it to handle such an instance...
Please review flask and HTML to handle the file!