I have recently aquired a beaglebone black board. I need some direction, as I would like to write my code in C and still use the board.
So far all the examples i have found are in bonescript or python. I’m also trying to stay away from adruino.
The project is to make the MPU-9250 of invensense work with the the beaglebone black.
Please note that i’m still a newbie in the development world, thus I would appreciate as much details as possible if anyone can help.
Buy the book –
Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux
by Derek Molloy for John Wiley & Sons, 2014
It walks you through programming in C on the Beaglebone, and setting up a cross compiler.
Look at his videos.
The book is several years old, so the Beaglebone and its OS are evolving and changing,
but this is still the best reference.
git clone https://github.com/derekmolloy/exploringBB.git
On Tue, 7 Mar 2017 01:53:04 -0800 (PST),
email@example.com declaimed the
I have recently aquired a beaglebone black board. I need some direction, as
I would like to write my code in C and still use the board.
And what seems to be stopping you? You /can/ run gcc to compile/link on
the BBB -- may be slow, but probably easier to set-up than to get a
Linux-ARM cross development system set up on a faster computer (especially
if you don't run Linux on that computer)
So far all the examples i have found are in bonescript or python. I'm also
trying to stay away from adruino.
The project is to make the MPU-9250 of invensense work with the the
Lot's of math work to make sense of the numbers reported such a sensor
-- if there is an Arduino library for it, I'd start with that (behind the
setup()/loop() standard IDE is a C++ compiler; so study the library source
code and adjust the actual low-level I/O operations to fit the BBB).
the device uses I2C protocol, so you'd have to configure the BBB for I2C
(if the pin-mux doesn't already have an I2C channel active).
Unlike the Arduino (and other microcontrollers) which have direct
access to the I/O pins, the BBB is running a general purpose OS and the
simplest access to the I/O has to go through the OS (sysfs "directory") --
this makes for rather slow operation, but one only needs to know C
open/read/write/close operations. To get faster access often requires
memory mapping the I/O pins (at least for GPIO uses -- I2C may use a
library). Oh, and the OS is highly protective, so applications often need
to be run with root privileges.
I'd suggest a Google (or your preferred engine) search for "beaglebone
black I2C" (one example: