What I have to do is an interface that allows an user select an option and, for example, if he select option 1, I have to create a command (char of diferent lengths deppending of the option, sometimes 18 bytes, sometimes 22, etc)
I do this connecting the microcontroller with the USB/COM interface to the PC.
Then, I have to convert the command in something I can send using the ETH interface to another device connected to the microcontroller.
I changed the program and now I use a switch structure in oder to create different strings for each case.
I don´t know if it´s the eaisiest form to do that, but I´m trying it...
The second part, convert the command to something that I can send using the ethernet library will bring more problems, I´m sure :S
hello!
I´m trying to connect my mbed microcontrollerto the pc, using the serial interface, and to another device, using the ethernet interface.
I need to send to this device commands that are composed by 8 bytes (for example "00 02 08 ff 63 47 a5 e3".
My problem is that I´m using the "Serial" library to ask for the command, and I need to convert the char that the user put on the keyboard into a string like the example.
I need some help because I have not many experience working in c++.
Thank you so much!