How do you clear the serial port buffer. The data that my program is reading in seems to be getting cut off.
How do you clear the serial port buffer. The data that my program is reading in seems to be getting cut off.
http://www.beyondlogic.org/serial/serial.htm
That should solve your queries(i hope).
Code:>+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.
I have read this document but I don't really know whats going on. Isn't there just some function I can send to empty the buffer?
Depends... which buffer? If you mean input buffer then no there isn't. Depending on exactly how it is setup you might be able to use fflush() to flush the output buffer.
I take it your not using Win2K/XP; I have had serious problems working with this in the past. I ended up resorting to VB. Access to quite a lot of the low level stuff was disabled in order to comply with some security rating for US mil. These problems don't seem to exist in the previous versions (I've not tried NT4) and definitely don't in Linux (although producing a product which only runs on Linux may be a little pointless.
Currently Reading:
Mathematic from the birth of numbers,
Effective TCP/IP programming,
Data Compression: The Complete Reference,
C Interfaces and Implementations: Techniques for Creating Reusable Software,
An Introduction to Genetic Algorithms for Scientists and Engineers.