MyoBridge - Direct Myo <-> Ardiuno Communication


by Vivo

MyoBridge - Direct Myo <-> Ardiuno Communication

Sadly i don't have an Bluetooth device with an HM-10 or HM-11 chip built-in.

I Have a couple of devices with the CSR BC417 chip on, and two BlueSmirf Silver (using the RN42).

Can i Use this firmware in any way to get my Myo to communicate to my Arduino through these devices?

And if, what should i do different than in the Wiki?

I really would appreciate some advice

by valentinrol

MyoBridge - Direct Myo <-> Ardiuno Communication

@jb33 Do you mean enabling pose notifications and IMU data at the same time? That should not be a problem, as far as I know. Just combine the pose data and IMU examples. Or do you mean something different?

@ewen As long as you're still using the same pin and uploaded the sketch properly, it should work. Maybe check if you use the right COM port? I have to admit that I don't know if the Micro is different in any way…

@Vivo Unfortunately no, you cannot use them. They are based on another chip and do not support Bluetooth Low Energy, which is essential to communicate with Myo.
by ewen

MyoBridge - Direct Myo <-> Ardiuno Communication

I tried with an Arduino Leonardo and it's working better . But now I think my HM-10 is not working because CCLoader doesn't go further :

“Uploading firmware…

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16”
It is waiting but there is no answer. Someone knows if I have to buy an other HM-10 or not? If not, what I have to do to make it work?
I am sorry about my silly questions.

Last edit: Jan. 15, 2016 03:05 AM

by liulin

MyoBridge - Direct Myo <-> Ardiuno Communication

Amazing!!Last night,I saw this topic , I would have bought hm-11 chip.I hope i can success!~~~
by Manar

MyoBridge - Direct Myo <-> Ardiuno Communication

Hello everyone, anyone have a code sample that allows me to control a servo using a Myo on Arduino ?
Thanks…
by Vivo

MyoBridge - Direct Myo <-> Ardiuno Communication

by Manar
Hello everyone, anyone have a code sample that allows me to control a servo using a Myo on Arduino ?Thanks…
I also would be interested in something like that!
In my case I'm trying to use two servos: one controlled by movement in the x-axis the other by movement in the y-axis, using the IMU data.

have somebody done something like that?

Kind regards,

Nico

Last edit: Jan. 18, 2016 04:03 AM

by ewen

MyoBridge - Direct Myo <-> Ardiuno Communication

Hello,
Is the firmware compatible with the CC2540?
If not, what should I do to make it compatible?
Thanks for your help,
by valentinrol

MyoBridge - Direct Myo <-> Ardiuno Communication

You can get the Myo Orientation as a quaternion, then just extract your x and y movements. Just look up the formulas. I did something like that with matrices, see https://github.com/vroland/MyoIMUGestureController .
Using this data to control a servo shouldn't be that hard, Arduino has a “Servo” library.

@ewen: I did not test it myself for the 2540, but I have a compiled image for it. (see page 2) But as always, try at your own risk

Also, I'm sorry I can't provide that much support at the moment. I'm currently travelling and don't have any Arduinos, etc with me
by jerzeek

MyoBridge - Direct Myo <-> Ardiuno Communication

Thanks man!
by Vivo

MyoBridge - Direct Myo <-> Ardiuno Communication

by valentinrol
You can get the Myo Orientation as a quaternion, then just extract your x and y movements. Just look up the formulas. I did something like that with matrices, see https://github.com/vroland/MyoIMUGestureController .Using this data to control a servo shouldn't be that hard, Arduino has a “Servo” library.

Thank you for your first reply.

If i understood you correct you talking about the sequence in the matrix.cpp:
/**
* convert a myo unit quaternion to a 3x3 matrix
* http://www.cprogramming.com/tutorial/3d/quaternions.html
*/
void unit_quaternion_to_matrix(Matrix33 &matrix, int16_t* quat) {

//convert the raw data in unit quaternion of floats.
float x = clip((float)quat / (MYOHW_ORIENTATION_SCALE), -.999999, .999999);
float y = clip((float)quat / (MYOHW_ORIENTATION_SCALE), -.999999, .999999);
float z = clip((float)quat / (MYOHW_ORIENTATION_SCALE), -.999999, .999999);
float w = clip((float)quat / (MYOHW_ORIENTATION_SCALE), -.999999, .999999);

matrix = 1-2*y*y-2*z*z;
matrix = 2*x*y-2*w*z;
matrix = 2*x*z+2*w*y;

matrix = 2*x*y+2*w*z;
matrix = 1-2*x*x-2*z*z;
matrix = 2*y*z-2*w*x;

matrix = 2*x*z-2*w*y;
matrix = 2*y*z+2*w*x;
matrix = 1-2*x*x-2*y*y;
}

and using these float values “x,y,z,w” for moving the servos?
if so, how do i call them in my main sketch? I have to admit that I'm not so experienced in diving into libraries that much

Maybe it helps to describe what i want to use it for:
I working on an artifact that should be controlled by the myo… its an fan which levitates a ball (you maybe know the experiment of an hairdryer levitating an ping pong ball…). The fan is mounted on an 2 axis platform (one servo tilting in the x direction the other in the y direction). Furthermore is the height (air pressure) of the ball controllable by the arm movement in the z direction.
The EMG data is used by 8 LEDs which lights the ball depending on the muscles activity in different colors/brightness.

Hope this helps to understand what I need to do

Maybe somebody has an advice how to acquire the necessary readings since i have the impression everything is already available from the MyoIMUGestureController and MyoBridge library.

Kind regards, Nico
Moderator control