Send data from Mbed to Wixel

I have 20 m3pis and I want them to be able to communicate over wixel and the main board is Mbed.
I am using the code below on the mbed

[code]m3pi m3pi;
Serial Wixel(p28, p27); // tx, rx

int main()
m3pi.printf(“Wixel!”); // need to send something to the m3pi just to stop it running the demo app…
//Wixel_nReset = 1; // take the Wixel out of reset
Wixel.baud(9600); // Wixel default baud rate (can configure other rates via Wixel config app…)
Wixel.printf(“Hello Wixel\r\n”);
while (Wixel.readable())

I also installed the radio_multi library by Geoff for the wixels.

My question is, how to pass the message from Wixel.printf(“Hello\n”) to the message field of the function radioMultiTxDataBlocking() of the radio_multi??

Thanks in advance


It sounds like an ambitious project having 20 mp3i’s communicating with each other wirelessly using the Wixel. The radio_multi library you are referring to is used in Geoff’s “Project Tabletop Multi-Agent Grid Navigation” project, which is linked in this post. We did not write that code, but after a quick look at radioMultiTxDataBlocking(), you would need to pass “Hello\n” as that function’s “message” parameter.

I recommend reading the radio_multi’s source code, which is well-documented, to get a better understanding of how the library works. The source code can be found under wixel-sdk\libraries\src\radio_multi in You can download from the project’s page on Geoff’s website.

- Amanda

Thanks for the reply Amanda.

I just didn’t understand how can I send “hello\n” in the message field of “radioMultiTxDataBlocking()” although hello\n is on the mbed and “radioMultiTxDataBlocking()” is on the wixel ??

btw, I am not using radio_link, I am using radio_multi which i believe is using radio_link somewhere.


It looks like I made a typo in my previous post, referring to the radio_multi C file (under wixel-sdk\libraries\src\radio_multi) as radio_link; thanks for point that out. I modified my previous post.

You would need to pass the message to the Wixel from the mbed via serial (pins P27 and P28 on the m3pi expansion PCB), read the incoming data from your Wixel, and pass it to the function radioMultiTxDataBlocking.

It sounds like you are new to using the m3pi and Wixel, so I strongly recommend reading through the m3pi User’s Guide and the Wixel User’s Guide before continuing. If you have some code written for your mbed and Wixel, you can post them here, and I would be happy to take a look.

- Amanda