Hi everyone at the Bela forum

I'm new at Bela (but not at Pd) since I received my copy yesterday !
I'm working on a project with a Research Center and University to build some "sonic communication objets" for patients with Alzheimer's disease.
I plan to use some accelerometers (analog inputs) for the second objet of this series and would like to use a compass like this one (https://www.adafruit.com/product/1714 which I already used with Arduino and Max/MSP in the past).
My question : is it possible to use an I2C communicatioin on the Bela board and get the data directly in the Pd patch ?
I tried to search on the web but didn't find anything on this subject.
Thanks for your answers,
Nicolas.

Have a look here. While the original poster did not follow up with me after a certain point on (and so we do not know if it ever worked or not), the approach is the same as I specified there, and should work as long as you follow the incremental steps:

  • find a working C/C++ library for Linux. Failing that, get one for Arduino and port it over (more time consuming)
  • use the library in a stand-alone program (hopefully there will be an example with the library itself) to verify everything works fine
  • following the library's documentation (and/or the C/C++ example code that comes with it), write a minimal regular C++ Bela program that uses the library and make sure it works ok
  • at that point, integrate such code with the libpd wrapper (see here) and you are done

Granted, this is not necessarily a piece of cake, especially if you are completely new to C++, however it is not impossible, and we are here to help at each step!

My first post in the thread linked above should give you all the details you need to get started. Let us know how you get on!

Hi giuliomoro,

Thanks for your detailled answer !
Luckily, I work on this project with a strong level C++ researcher and programmer.
We will look at your method to have it working for our project !

Hi Nicolas,

I'm interested in what you are doing here with sound and AD, do you have any links to info?

Cheers

Andy