- My question:
I’m using a socket in an AIR project to receive serial data from an arduino.
However, my arduino spits out the data too fast, so the input buffer keeps filling up.
I know the OUTput buffer can be cleared with the flush() command.
But how can I clear the INput buffer ?
- Why exactly ?
I’m using an arduino to do spectrum frequency analyses on music and this should be visualized in my air app.
Arrays of frequency levels are coming into my air app over serial and bars should display the level.
If the buffer fills up with too many arrays to be processed, the visualization gets behind.
Thanks for reading !