Hello, mbed pros! I am new to mbed.
I connect mbed to pc and want to transmit 7 bytes hexdecimal command to mbed and want to see feedback on pc.
The seven bytes hex command is like this, FF 01 00 04 3F 00 44.
I have no idea how to write the code.
I will be grateful if anyone could give advice.
Best regards
Hello, mbed pros! I am new to mbed.
I connect mbed to pc and want to transmit 7 bytes hexdecimal command to mbed and want to see feedback on pc.
The seven bytes hex command is like this, FF 01 00 04 3F 00 44.
I have no idea how to write the code.
I will be grateful if anyone could give advice.
Best regards
As a starter look up serial over the USB.
Use a terminal emulator and you can then type in your command string, which will be sent to the mbed. Your mbed can perform the appropriate response and send back a string to the PC which will be viewable on the terminal emulator.
You MUST install the driver for the PC and as I learnt it has to be done for EVERY mbed module that you use..
As a starter look up serial over the USB.
Use a terminal emulator and you can then type in your command string, which will be sent to the mbed. Your mbed can perform the appropriate response and send back a string to the PC which will be viewable on the terminal emulator.
Have a look at :-
http://mbed.org/handbook/SerialPC
You MUST install the driver for the PC and as I learnt it has to be done for EVERY mbed module that you use..
I use this build strings in CSV format prior to writing to disk and think it will be what you require.
Hi Neil,
I think you need to investigate fprintf
http://www.cplusplus.com/reference/clibrary/cstdio/fprintf/
I use this build strings in CSV format prior to writing to disk and think it will be what you require.
I have finished the first step, using scanf and printf to input and show the hex commands on PC.
My second step is to transmit command from pc through mbed to camera. Shall I combine the first code with "Pass through characters in both directions between the PC and Serial Port", which is shown in the serial communication with a pc?
Hell Kevin,
I have finished the first step, using scanf and printf to input and show the hex commands on PC.
My second step is to transmit command from pc through mbed to camera. Shall I combine the first code with "Pass through characters in both directions between the PC and Serial Port", which is shown in the serial communication with a pc?
{{/media/uploads/shef_eee_1/qq--20121119213238.jpg}}
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.
Access Warning
You do not have the correct permissions to perform this operation.
Hello, mbed pros! I am new to mbed. I connect mbed to pc and want to transmit 7 bytes hexdecimal command to mbed and want to see feedback on pc. The seven bytes hex command is like this, FF 01 00 04 3F 00 44. I have no idea how to write the code. I will be grateful if anyone could give advice.
Best regards