SPI in C/C++ and SPIDev-usage

189 views
Skip to first unread message

Jonas Hjulstad

unread,
Feb 25, 2019, 1:32:20 PM2/25/19
to BeagleBoard
Hi!
When i search for documentation on SPI-communication in C/C++ for BeagleBone Black, i get a lot of different solutions to the issue.
Im looking for an up-to-date solution for connecting my Sparkfun LSM9DS1 Breakout to the BBB's SPI pins:


I've managed to setup pins through universal-io commands from terminal, and sent a few registers using python and Adafruit BBIO.
I'm new to object-oriented programming, but want to know where the core locations of the SPI bus sits, and the configurations neccessary to configure pins like universal-io does.
Another idea is to redirect the Sparkfun-library to BBB's SPI pins, but i do not know where to find these

I have a decent understanding of the debian file structure, but i do not know where libraries and SPI pin configurations are located 

Does anyone have a clue which could lead me in the right direction? All help is appreciated!

Mala Dies

unread,
Feb 28, 2019, 10:34:37 PM2/28/19
to BeagleBoard
Hello,

I think they are located as spidev or maybe not. Let me take a quick glance of my file system. Please hold.

...

/sys/bus/spi/devices/

This shows some available spi devices.

Seth

Jonas Hjulstad

unread,
Mar 1, 2019, 1:58:58 AM3/1/19
to beagl...@googlegroups.com
Thanks for the respons. I managed to find a SPI-Library communicating via the SPIDev buses at DeeplyEmbeddeds websites, which Ill integrate i to the Breakout's Arduino library. Ill post IT here once complete! 

--
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 beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/f1813619-6424-4448-8a42-4456279416bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mala Dies

unread,
Mar 6, 2019, 6:40:45 PM3/6/19
to BeagleBoard
Okay,

If you need the names of some books that incorporate some Linux Distros on SoC or SiP (BeagleBone stuff) and arduino, let me know. I have some books to mention.

Seth

P.S. They are mostly dedicated to the Pi thing but you can transfer the info. and ideas to the BBB family of computing. I always try to update the books from the past for fun. I update their usage w/ current configurations of the BBB family and Debian. Staying busy is half the battle. Good luck w/ your project. I will wait to see it live in action. Oh and there is a library for SPI from Adafruit, too. See here: https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/spi and https://github.com/adafruit/adafruit-beaglebone-io-python. The second link for github.com has SPI stuff for the BBB is further down on that page.

Mala Dies

unread,
Mar 6, 2019, 6:42:10 PM3/6/19
to BeagleBoard
Oh and I Almost Forgot,

Hello Again...if you look up adafruit spi beaglebone black on google, there should be some nice adventurous stuff on the page.

Seth


On Friday, March 1, 2019 at 12:58:58 AM UTC-6, Jonas Hjulstad wrote:
Reply all
Reply to author
Forward
0 new messages