sensor (MPU-9150) -> yún -> OSC via WiFi

Dear advanced users,

I am trying to send the values from a MPU-9150 connected on a arduino yún by WiFi connection to MaxMSPJitter on a MacBook Pro.
The form of the data should be OSC (Open Sound Control) using UDP
However, I am not able to find a proper method.
What should I do?

You can find the information of the MPU-9150 in the following webpage:

Thank you in advance.

Hi!

Well the data flow should be:

MPU-9150 <--i2c--> Arduino (the arduino "core" of the Yun) <--bridge--> OpenWrt (the linux "core" of the Yun) <--ethenet/OSC protocol--> MacPro

I found many different libraries (C, Java...) on the OpenSoundControl website you can use to develop the linux part, it depends on the programming language you know best.

just for a reference, I found this blog post: it uses Processing but I don't know if you can run it on your Yun:

Dear prko,

i use OSC on my yun to control DMX lights at the yun.
To realize that, i found some nice help by Peter Kalajian Blog post.

I know you need it the opposide way, but parts of his phyton script may help you, cause he sends some feedback to the osc client.

I think these line might help you, if you write a phyton script.

from OSC import OSCServer,OSCClient, OSCMessage
import sys
from time import sleep
from tcp import TCPJSONClient

client = OSCClient()
client.connect( ("192.168.240.135", 9000) )

def fader_callback(path, tags, args, source):
        global fader1Feedback
        if path=="/1/xy1":
                fader1Feedback = float(args[0])
                msg = OSCMessage("/1/label1")
                msg.insert(0, fader1Feedback)
                client.send(msg)

#execute
server.addMsgHandler( "/1/fader1",fader_callback)

Additional you need to add the python-pyos package, to your yun.

The code is striped down, but it still needs some modifications to act in your sense.
I hope i could help you :slight_smile:

Langhalsdino