Hey guys, I'm running a c# program on my computer that takes input from a WiiMote. I have 4 bytes and 13 booleans. Also, I have a few questions that go along with it.
1) What is an efficient way to send these values over serial? Should I use bitwise operations to condense the 13 booleans? It's in c#, so does anyone have a recommendation for this?
2) Obviously dependent on number one, on the mBed side, I'll need to decode the string and once again, I'm going for efficiency. As of right now, I have if statements checking for characters just for testing purposes. Any suggestions on this?
3) With regard to the m3pi, is the WiiMote connected directly to the mBed? That would save me the trouble of having this laptop as a median. I tried searching but couldn't find what I was looking for. Is there a link with information that I'm not seeing? I would *love* to do it that way.
Anything helps guys, thanks a lot!
Take a look at:
This is an example of code that uses a BT USB dongle to control the m3pi.
The original USB bt code is called "blueusb", so you can find a few references around the site that might help. Does look like there is a bit of a project for someone to clean up use of these USB dongles to make it nice and easy.
Thanks Simon, that's exactly what I was looking for!
With regard to the other questions, I have 4 bytes and 13 booleans. Having a 115,200 baud rate, that's over 11,520 bytes a second, which should be plenty of speed. I will be sending a nonstop buffer of 17 bytes (I'll convert booleans to bytes before sending in my c# application).
What is an efficient way to catch a 17 byte buffer coming in? In my while loop, should I just run a scanf and read the string? Then how would I get my 'string' to actual bytes again for the mBed?
Thanks again guys! I hope to have something neat to show in a few weeks!
I have a Cirago BTA-6060. Would it work as the USB dongle on the m3pi side?
Please log in to post a reply.
mbed, the fastest way to prototype with ARM based microcontrollers.
^ back to top