Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
11 years, 1 month 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
11 years, 1 month 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: