I am working in a project which I am sending, constantly, data to the pc via the “USB to Serial Converter” project from LUFA. I am using the ATmega32U4 and the HTerm to receive the data.
The code works fine.
What I would like to know is: when I power the microcontroller on, the code already starts to send data even before I connect the terminal. Is it possible to change that? And how?
The problem is that the ring buffer gets full and then the data starts to overwrite the other data, etc etc…
I would like to stop putting data to the buffer if the terminal is disconnected. And then continue when the terminal is re-connected.
I would like to know if there is an event that fires when terminal is connected and disconnected. This way I could tell my code to stop/start adding data to the buffer.
Can anyone help me with that? Any tip is appreciated!
Thank you very much!!