two MBEDs talking

22 Nov 2011

Hey gang,

I'm trying to hook two MBED modules together. I have sensors on both and I'm going to set up one MBED as a Master and the other a Slave - the Slave will report back to the Master at regular intervals. The caveat is that I need the communication method between the two to be hot-puggable (with power on) without fear of blowing up electronics (Slave is not necessary for operation and can be unplugged from the Master). Ideally, I'd like to use USB but I can't seem to find any libraries that accomplishes what I need. Best I can find is generic serial.

Ideas? -CED

22 Nov 2011

Hello, if USB so what about one mbed as USB Host http://mbed.org/users/peterbarrett1967/notebook/blueusb---bluetooth-and-usb-host-controller-for-mb/ in this example mbed can be usb Host for many devices as HID mouses, keyboards, flashdisks, bluetooth dongles.... and second mbed as USB raw HID http://mbed.org/handbook/USBHID but You will have to make some changes to Host program especially in AutoEvents.cpp to define auto event for Your HID.

In case to shorten the test process if things will work, second mbed can be using USB keyboard example http://mbed.org/handbook/USBKeyboard and use function - send (HID_REPORT *report). So USB host mbed will think that keyboard is connected but You will send what You want using send report function. Report is 8 bytes in length.

22 Nov 2011

Good call with USB Keyboard, Don't forget the new version has Num Lock, Key Lock, So you could implement some kind of handshaking

Ceri

24 Nov 2011

I'd recommend ethernet.... You can network several mbeds this way, and it's great.... I have successfully networked many mbeds together with this method.. UDP Is good for this.... http://mbed.org/cookbook/Sockets-API

Using your example, this sounds exactly what you're looking for... .... .... http://mbed.org/cookbook/RPC-over-Websockets

All from http://mbed.org/cookbook/Homepage (Lots more examples)