MyoBridge - Direct Myo <-> Ardiuno Communication


by eric_castro

MyoBridge - Direct Myo <-> Ardiuno Communication

by gilhrpenner
@valentinrolI 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.

flashing your CC2540 or CC2541 with the custom firmware is necessary.

in my case, I have an HM-10 soldered to a JY MCU, so it was a bit tricky to solder a bit of cable to the needed pins for flashing as I have virtually no room to connect anything except the UART pins.

like this:


then, you must connect to each of the pins required for flashing, here's the pinout diagram:


as you can see from my impressive soldering skills, I added breadboard cables to:

P2_2: Debug Clock
P2_1: Debug Data
RESETB: Reset pin

I believe it's kind of similar on an HM-11 if you have that one.

IMPORTANT: DO NOT TRY TO FLASH THIS WITH AN ARDUINO ON 5V! HM modules operate on 3.3V logic so you either need a logic level converter, voltage dividers, or an arduino that operates on 3.3v if you want to connect it directly.

I personally used a Funduino UNO R3 which lets you switch between 3.3v and 5v and it's super cheap (costs around 10 bucks on aliexpress, may be a bit more in your local resellers). Itead Studio also has a clone that can operate in 3.3v

I will post Part 2 on how to use CCLoader.exe to flash the firmware later - meanwhile you can already start warming up your solder iron and do as I showed you

Last edit: Nov. 26, 2015 09:17 AM

by gilhrpenner

MyoBridge - Direct Myo <-> Ardiuno Communication

by eric_castro
by gilhrpenner@valentinrolI 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.flashing your CC2540 or CC2541 with the custom firmware is necessary.in my case, I have an HM-10 soldered to a JY MCU, so it was a bit tricky to solder a bit of cable to the needed pins for flashing as I have virtually no room to connect anything except the UART pins.like this:then, you must connect to each of the pins required for flashing, here's the pinout diagram:as you can see from my impressive soldering skills, I added breadboard cables to2_2: Debug ClockP2_1: Debug DataRESETB: Reset pinI believe it's kind of similar on an HM-11 if you have that one.IMPORTANT: DO NOT TRY TO FLASH THIS WITH AN ARDUINO ON 5V! HM modules operate on 3.3V logic so you either need a logic level converter, voltage dividers, or an arduino that operates on 3.3v if you want to connect it directly.I personally used a Funduino UNO R3 which lets you switch between 3.3v and 5v and it's super cheap (costs around 10 bucks on aliexpress, may be a bit more in your local resellers). Itead Studio also has a clone that can operate in 3.3vI will post Part 2 on how to use CCLoader.exe to flash the firmware later - meanwhile you can already start warming up your solder iron and do as I showed you

As I already said I'm new to this whole thing, just trying to get myself a prosthetic hand..
What happens when my HM-10 bluetooth is already soldered?

That's the one I have
http://www.ebay.ca/itm/131563315001?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Thanks
by eric_castro

MyoBridge - Direct Myo <-> Ardiuno Communication

@gilhrpenner
if you look at the first picture I posted, you have the exact same module I have, which is also already soldered, therefore I showed you how I managed to add cables to the needed pins for flashing. there are probably cleaner ways but I was really in a rush :p

now, I did forget you're trying to get yourself a prosthetic hand - hopefully you can sort out the tricky soldering part with someone's help ?

once you get those pins (P2_2, P2_1, RSTB) available out of the HM-10 board, you can flash it with an Arduino and CCLoader.exe, but as I mentioned, the logic level needs to be 3.3v and not 5v like most arduino boards.

I will later add the remaining part of the tutorial on how to do this. The whole idea here is to avoid having to use a CCDebugger cable from Texas Instruments which costs around 40 bucks and we won't be doing this more than a few times, so it makes no sense to spend money on that.
by gilhrpenner

MyoBridge - Direct Myo <-> Ardiuno Communication

@eric_castro

Thanks for the help, I really appreciate that.
I'll stop by at some electronic store and ask them to help me with that.

I'm looking forward for the part 2 of your tutorial.
Have a good one.
by gilhrpenner

MyoBridge - Direct Myo <-> Ardiuno Communication

by eric_castro The link for the bin files you uploaded are not working, do you mind uploading it again?
I also got my bluetooth soldered so I just need the files to try to flush it

Thanks
by valentinrol

MyoBridge - Direct Myo <-> Ardiuno Communication

@wxirxn Could you take a look at what firmware version you use for Myo? If you use an old version, there might be differences in the Bluetooth profile causing the Bluetooth discovery to not work properly. I think you should be able to check that using Myo Connect and just try to update to the latest version.

@gilhrpenner You might want to read the wiki pages of the git repository to understand how this software works. Basically, it needs a special program running on the Bluetooh chip which then communicates with the Arduino.
by gilhrpenner

MyoBridge - Direct Myo <-> Ardiuno Communication

by valentinrol would you have the bin file?
I also tried to run the windoes CC Loader and it didn't do anything or open, how is it supposed to work?

Sorry about those silly questions.
by wxirxn

MyoBridge - Direct Myo <-> Ardiuno Communication

by valentinrol
@wxirxn Could you take a look at what firmware version you use for Myo? If you use an old version, there might be differences in the Bluetooth profile causing the Bluetooth discovery to not work properly. I think you should be able to check that using Myo Connect and just try to update to the latest version.

I'm on 1.5.1970, which is the latest firmware according to the website.
by valentinrol

MyoBridge - Direct Myo <-> Ardiuno Communication

Unfortunately, I can't help you with the CC Loader, you probably have to wait for @eric_castro's explanations. I was using the original CC Debugger and dont have the hardware available any more. You could try to use a hex2bin converter for the files, but again, I cant say which one will work.
But dont worry about asking questions
by valentinrol

MyoBridge - Direct Myo <-> Ardiuno Communication

@wxirxn Hmmm… That should be allright, I was on 1.5.1930 but that should not make a difference. Can you try to find the exact code position where it hangs up? Simply add some Serial.println() statements to the begin()-function in MyoBridge.cpp (somewhere in your libraries directory) and see how far it gets.
Moderator control