Myo for Processing


by darius

Myo for Processing

Hello all,

with the following library you have access to Myo in Processing:
https://github.com/nok/myo-processing

Happy coding,
Darius

Last edit: Feb. 2, 2015 06:55 PM

by @smngreenberg TL

Myo for Processing

Awesome, thanks for posting this! I have added it to the sticky as well.

Cheers,
Scott

Last edit: Nov. 10, 2014 03:12 PM

by a.arango09

Myo for Processing

Thanks
by jsmarsch

Myo for Processing

Hi Darius,
I downloaded and installed your Myo for Processing Library. It works on my colleagues Windows computer, however on my Mac I receive the following error:

A library relies on native code that's not available.
Or only works properly when the sketch is run as a 32-bit application.

I think the problem is that my Mac runs on 64 bit. Do you also have a library that is compatible with the Mac?
if so, that would be incredibly helpful.

Thanks
Jessica
by darius

Myo for Processing

Hello Jessica,

I sent you an email.

Happy coding,
Darius
by slp.platte

Myo for Processing

Hi Darius,

thanks a lot for the MYO-Processing library – it works great :-)

As I need to use 4 MYO-armbands for my project I was wondering if it is possible to use more than one MYO with your library?

Thank you,

Sarah
by darius

Myo for Processing

Hello Sarah,

I refactored and revised the library the last few days supporting multiple devices. Could you please download that version of the library (from the development branch), install and test the new example e4_multiple.pde?

I just have one device, so I can't test it with multiple devices. So, it would be great, you will post your experiences whether it works fine or not.

Thanks for your help, and happy coding,
Darius
by slp.platte

Myo for Processing

Hi Darius,

great, thanks a lot!
I tried the e4_multiple.pde with two sensors and it seems to work – I can test it with 4 or 6 sensors later. However, the emg-example doesn't work anymore with the new processing-version. Is there a quick fix for the issue? I plan to use emg-data from multiple armbands and forward it to MAX/MSP via OSC.

Thanks a lot for your help and let me know if I can do further tests with multiple MYOs (we have 22 armbands),

Sarah
by darius

Myo for Processing

22 armbands … you are in heaven.

I'm glad that it works. If you want to use multiple devices, you have to use specific callbacks, i.e.:

Single device:
void myoOnPose(Myo myo, long timestamp, Pose pose) { … }

Multiple devices:
void myoOnPose(Device myo, long timestamp, Pose pose) { … }

Because of that the first three examples don't work with multiple devices. I didn't delete the first kind of callbacks in respect of backwards compatibility and the auto updating of the contributed libraries in the Processing environment. The most people have just one device, I guess.

For you I changed the example to support multiple devices:
https://gist.github.com/nok/59f677115e4ddf2088a9

Maybe you just need the part of the myoOnPose method, where you broadcast the newest data via OSC.

Happy coding,
Darius

Last edit: April 21, 2015 06:39 PM

by slp.platte

Myo for Processing

Wow, this is great – thank you so much for your help!

Unfortunately, I get a NullPointerException on line 28 device.withEmg(); and I have no idea how to fix it.
The NullPointerException only occurs when I wear the MYO-armbands.

Best,
Sarah
Moderator control