create a small char buffer, memcpy into it and send the buffer. Monitor your serial port and watch to see if the bytes are correct.
Look at other client source code and see how they did it and quit re-inventing the wheel. Even better, use another clients source code and build on top of that so we can get more features instead of more base code that we don't need. |