Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more. Accepting essential orders - here's how.
0

BBB SPI simple BBIO example?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

BBB SPI simple BBIO example?

by jamieson_olsen on Fri May 03, 2019 1:34 pm

I have the BBB board flashed with the latest image. Trying to get a simple SPI python program up and running:

from Adafruit_BBIO.SPI import SPI
spi = SPI(0,0)
spi.close()

Running it returns:
IOError: [Errno 2] No such file or directory

So far the forum posts I've found talk about capes and slot files and kernel overlays -- it's my understanding that all of this low level stuff has changed.

Is there an up to date tutorial with a simple example showing how I can access SPI0 on my BBB?

jamieson_olsen
 
Posts: 1
Joined: Fri May 03, 2019 1:28 pm

Re: BBB SPI simple BBIO example?

by drewfustini on Tue May 07, 2019 7:59 am

I'd like to know more about the configuration of your BeagleBone.

Please paste the output of:
Code: Select all | TOGGLE FULL SIZE
sudo /opt/scripts/tools/version.sh


and please paste the output of:
Code: Select all | TOGGLE FULL SIZE
ls -la /dev/spidev*


If you are able to, then it would also be helpful to see the output from strace which shows which system calls were issued:

Run:
Code: Select all | TOGGLE FULL SIZE
sudo strace -f -o /tmp/strace.log python ./name-of-your.py

Code: Select all | TOGGLE FULL SIZE
grep spidev /tmp/strace.log

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Please be positive and constructive with your questions and comments.