How can sensor data (gyro + accel) from Android phone be sent to Max / MSP
Well, the topic title says it all...Id like to somehow get sensor data into Max, if possible. Any suggestions?
Regards Mads
TouchOSC is supposed to handle accelerometer data:
https://hexler.net/software/touchosc-android
I'm not sure about gyro's.
There are other free apps, too. I just got some good results very quickly with one called oscHook. ymmv
i was just going to suggest Mira, but i see that it's only for Apple :(
Miraweb does it dandy - iOS OR Android
find it in the package manager alongside Mira
Is for PC or Mac btw -
https://cycling74.com/downloads/sys-reqs/
{I think the Miraweb was a brilliant way for Cycling to port Mira to *everywhere*, without having to keep up with endless iterations of Mac and PC versions]
Paste in this patch [is simply two of the help files moshed together.]
just tested with a Iphone 6 and a Android Galaxy something or another.
Make sure the computer is on same network as the Android .
in Android's web browser point it to the address listed in the Max patch as "websocket connection available at: __________"
Hit "connect"
Voila - rotation rate / Accelerometer/ Orientation / Maybe compass for your data pleasure.
heres the patch :
cheers!
jd
Can I ask,
I have a phidget spatial - so it outputs 3 axis accel in g's, 3 axis gyroscope deg/s and 3 axis magnetometer.
is there a way to use this patch to convert the outputs to angles of tilt - so I can then measure movement or use my spatial to rotate an onscreen 3d object?
I new to MAX/MSP so not certain how I can get my raw figures to insert into the relevant part of this patch?
Hi again, and sorry for the lateness of this reply, but thanks so much for the suggestions & the patch!
Nice thread! Does anyone if know the version of the operating system of the phone makes a difference?
I find John's patch works really well on a Android 6 and Android 7 device for displaying their sensor data. But sensor data from my Android 10 phone is not displayed by the example patch. (The simple graphic bar chart thing from the help file does work between phone and (mac) laptop.
I have been looking to see if security settings or other permissions for the Android 10 phone might be the problem. But can't see any way to tell the browser to share sensor data (if you know what I mean).
Do you think it is the version of Android? Or could it be some other problem?
Cheers!