I would very much appreciate any advice on this.
I am reading a single byte from the serial port and wanting to store up to a hundred of these. Essentially I need to check incoming data to see if the value of it has been sent previously. These are my thoughts.
Set up a Fifo or Ring buffer with 100 elements
When a byte is received check through all 100 elements to see if it has been sent before, discard if so, otherwise store. Lose oldest data or flush when full.
Embedded CPU, so need to be as memory efficient as possible.
Would you consider this the best way of doing this. Still fairly new to C, so any guidelines on how to set this up, or indeed any better suggestions. Many thanks.