hi everyone I'm looking for a good alogrithm to send a float variable to a PC by the serial port. First I have to separate the float variable in bytes to be read to send by the serial port. do i have to send the variables in binary or ascii?? what do you recommend me?? Another problem is in the pc.. if I want to use visual basic to print the value how can I join the bytes to have the real float variable?? thanks
do i have to send the variables in binary or ascii? Which ever format you want. If you choose binary, you can encapsulate the float(s) in a binary framing protocol. Here is a document describing a very simple binary framing protocol: http://dhenry.home.sprynet.com/hdlcbcc.pdf