openFrameworks with Arduino and accelerometer + gyro

Hello,
I would like to ask if anyone has experience with connecting Arduino and Adafruit LSM9DS0 (accelerometer + gyro) with openFrameworks?
I would like to draw the value of Gyro axis from the Arduino to oF. I realised there is a similar library called ofxOsc but they are drawing pitch, amplitude… Is there any similar addon or library anyone would recommend please?

Cheers,
Karen

I’m not entirely up on the state of Arduino OSC support, but last I knew, it was better supported over ethernet than Wi-Fi. Depending on your hardware configuration, another option might be to have your Arduino sketch communicate gyro data over serial to your OF-running machine - I’ve used @bakercp’s ofxSerial and found it worked well in a similar config.

Yeah, it looks like Wi-Fi support is on the 2015 hopeful list for the CNMAT/OSC repo. That said, there might be other Arduino libs for OSC…

1 Like

I have the same accelerometer and and communicate between and arduino variant and the breakout via I2C. If you want to do sensor fusion on the board, you should check out https://github.com/kriswiner/LSM9DS0, etc.

Then, you can simply create a Serial object with Serial.begin(...) and send your attitude quaternions to openFrameworks as a comma separated list delimited with a new line \n character.

You can read it with the built-in example, or I also recommend my ofxSerial addon as a replacement.

1 Like

Thanks Baker! I will try that now :)))
Cheers!