10 years, 5 months ago.

GUI to mbed

hey guys,

i have a project which requires me to design a gui using visual studio 2010 and i have created the windows form with all the codes and everything is in place i have a problem locating a solution as to how i should be relaying signals from my gui to the mbed and vice versa.Is there any way anyone could help me and tell me the procedure as to how to go about this.Need help immediately.

thanks.

1 Answer

10 years, 5 months ago.

Depends a bit on how the mbed is going to be connected to the PC running the GUI: by USB cable or network ? But both options need you to setup a protocol to transmit and receive the data you need to be sent to and from the mbed.

The mbed can communicate over the USB cable through a (virtual) serial port to the Windows PC like this:

Serial pclink(USBTX,USBRX);

pclink.baud(9600);

This will initiate the serial link on the mbed side to communicate to the PC at a speed of 9600 baud. You can then use 'printf' or 'putchar' to send something to the PC and 'gets' or 'getchar' to receive something from the PC.

On the Windows PC side you need to open a channel to read and write to and from the (virtual) serial port of the mbed.

Also have a look at:

/cookbook/DotNET

thank you for the swift reply, the mbed will be connected via a USB cable and could you elaborate on as to how to open a channel to read and write from the serial port of the mbed(the windows pc side) thanks.

posted by zain sharief 27 Oct 2013

That is explained in the link at the end of the message :-) Scroll a bit down to the comment of Sophie, there is an example how to create a channel to the serial port.

posted by Gert van der Knokke 27 Oct 2013