MyoBridge - Direct Myo <-> Ardiuno Communication


by valentinrol

MyoBridge - Direct Myo <-> Ardiuno Communication

Thank you for testing the library! Also thank you @eric_castro for the link, I will include it in the wiki as an alternative to the CCDebugger. It it good to see that someone finally got it working.
by zero13312000

MyoBridge - Direct Myo <-> Ardiuno Communication

@eric_castro can u share bin file u use? i have hard time to convert hex file to bin file
by wxirxn

MyoBridge - Direct Myo <-> Ardiuno Communication

by zero13312000
@eric_castro can u share bin file u use? i have hard time to convert hex file to bin file

This would be useful for me too! I converted the original .hex file bundled with MyoBridge (for CC2541) to bin (using hex2bin) and managed to flash it to my HM-11 using CCLoader, but uploading and running the printFirmwareInfo example (or any other example) doesn't show me anything past “Searching for Myo…” in the serial monitor. The indicator on my Myo, hovever, DOES light up blue (and switches off when I unplug my Arduino), so I know it's connecting to the HM-11, at least.

@valentinrol: Is this an issue with the firmware I flashed to my HM-11 or something else? Should I try converting the CC2540 hex file and try my luck?

@eric_castro: Did you convert the CC2541 or CC2540 hex to bin to upload to your HM-10?

Thanks in advance! (:

Last edit: Nov. 23, 2015 04:03 AM

by eric_castro

MyoBridge - Direct Myo <-> Ardiuno Communication

@zero13312000, @wxirxn here are the bin files:
MyoBridge_CC2541.bin
MyoBridge_CC2540.bin

My modules are HM-10 and the ones I have are CC2540 so used that one. I flashed these with CCLoader from RedBearLabs, remember to upload the CCLoader arduino sketch first, do all the wiring with your HM module, then run CCLoader.exe specifying the COM port (of the arduino with CCLoader sketch) and the path to the bin file.

Takes a little while and there's no way to tell from the module / software that the flashing was successful, you can virtually upload anything with a .bin extension for that matter.

I can't remember well, but I think that at first it wasn't working because I wasn't doing the sync gesture. Maybe this is what you're missing ?

In my case after I got everything figured out, all sample codes provided with the library are working perfectly.

Last edit: Nov. 23, 2015 05:29 AM

by wxirxn

MyoBridge - Direct Myo <-> Ardiuno Communication

by eric_castro
@zero13312000, @wxirxn here are the bin files:MyoBridge_CC2541.binMyoBridge_CC2540.binMy modules are HM-10 and the ones I have are CC2540 so used that one. I flashed these with CCLoader from RedBearLabs, remember to upload the CCLoader arduino sketch first, do all the wiring with your HM module, then run CCLoader.exe specifying the COM port (of the arduino with CCLoader sketch) and the path to the bin file.Takes a little while and there's no way to tell from the module / software that the flashing was successful, you can virtually upload anything with a .bin extension for that matter.I can't remember well, but I think that at first it wasn't working because I wasn't doing the sync gesture. Maybe this is what you're missing ?In my case after I got everything figured out, all sample codes provided with the library are working perfectly.

Thanks so much!

I think I found the issue! The RX pin on the HM-11 wasn't quite connected properly to the breadboard; I'll resolder some of my wires and try again (:
by wxirxn

MyoBridge - Direct Myo <-> Ardiuno Communication

My Arduino and HM-11 are communicating properly now! I do have another issue though, the serial monitor reaches “CONN_STATUS_BRIDGE_SETUP” and doesn't go any further than that. Any ideas? :/
by gilhrpenner

MyoBridge - Direct Myo <-> Ardiuno Communication

Hi, thank you very much for releasing this library!
I have a question, I'm new to Arduino and Myo and I'm trying to build a prosthetic hand for me.

I didn't understand the CC Debugger and Flashing the Firmware steps, how exactly should I do it?
Do I need to buy any parts for that or just using my arduino and bluetooth is enough?

I have a HM-10 and when I connect my bluetooth to the board it connects right away to my Myo armband and because of that when I run printFirmware example it can't connect to my myo.

Thanks again

Last edit: Nov. 25, 2015 11:23 PM

by valentinrol

MyoBridge - Direct Myo <-> Ardiuno Communication

@wxirxn This probably means that the library waits for the armband to send some information, like firmware info, etc. Make sure that the armband is not in standby mode (sync it or shake it sometimes) , the blue LED on the armband should be blinking or light up constantly. If this does not help even after retrying, you could try to find where it hangs exactly. If you know how to do that, look in the begin() function of MyoBridge.cpp.

@gilhrpenner What parts do you have? If you have the original Texas Instruments CC Debugger, you can follow these steps and also find tutorials elsewhere. If not, you can try the CC Loader program eric_castro mentioned, but I can't help you with this one.
And what does connect to what?
by wxirxn

MyoBridge - Direct Myo <-> Ardiuno Communication

by valentinrol
@wxirxn This probably means that the library waits for the armband to send some information, like firmware info, etc. Make sure that the armband is not in standby mode (sync it or shake it sometimes) , the blue LED on the armband should be blinking or light up constantly. If this does not help even after retrying, you could try to find where it hangs exactly. If you know how to do that, look in the begin() function of MyoBridge.cpp.

One thing I tried doing was connecting the reset pin of the HM-11 to pin 4 (through a voltage divider), and including in the code:

MyoBridge bridge(bridgeSerial,4);

and when my Myo goes into standby/sleep the serial monitor would read:

CONN_STATUS_SCANNING
CONN_STATUS_INIT
CONN_STATUS_SCANNING
CONN_STATUS_INIT
.
.
.
CONN_STATUS_SCANNING
CONN_STATUS_INIT
CONN_STATUS_SCANNING
CONN_STATUS_INIT

(which I guess makes sense since it can't connect to anything)

Until I shake/wake up my Myo, after which the LED turns solid blue (indicating a connection) and the serial monitor reads:

CONN_STATUS_CONNECTING
CONN_STATUS_DISCOVERING

indicating a connection to the Myo, but it doesn't go any further than that.

Is there a way to check if the correct firmware was flashed to my HM-11? I've tried to flash it several times with both my converted .bin and eric_castro's .bin files (using CCLoader and triple-checking that my connections are correct), and with multiple chips (I've tried it on a BLE Bee with a CC2541 with the same results). Otherwise, could it be an issue with my Myo firmware/settings?

Last edit: Nov. 26, 2015 04:58 AM

by gilhrpenner

MyoBridge - Direct Myo <-> Ardiuno Communication

@valentinrol

I don't have this CC Debugger no.
I'll try to download this program eric_castro after I get home from work.

Myo Myo connects to my bluetooth right away, the red light of the bluetooth stops flashing and the Myo blue light turns on indicating its paired to something, yet I can't use any of your examples, but that only happens when I have AT+ROLE set to 1.

Thanks.
Moderator control