reduce number/data frequency
hi
I am wondering what is the best way to reduce a random stream of 0's & 1's if numbers are arriving at a number box very quickly? 1,0,0,0,0,1,1,1,0,1,1,0
is there an efficient way to filter out perhpas single number in every 3 or 4 numbers? Would a counter and a gate be a good idea? or is there a purpose built module for this perhaps? I tried (change) but sometimes only '0' is sent and therefore nothing is sent for until a 1 arrives.
the reason I ask is that i am sending these 1's and 0's to a serial module and my arduino is not keen. I have everything set too 115200, but it gets clogged up real easy : / So I thought best to reduce the flow.
thanks : )
look at the speedlim object
cheers jonathanb : )
i have found Matt Wright's 'Lbyl' object quite useful for tasks like this.
http://cnmat.berkeley.edu/downloads
I have a device that produces numbers from 0 to 4095 and they're very jumpy, so I do this kind of averaging. Anyone better solution?
I would look into [bucket] if I were you. there might also me a [zl] implementation for that, can't remember right now...
An old thread where a bunch of methods are compared:
https://cycling74.com/forums/smoothing-out-numbers
Thanks! Good to know them. Now I just have to pick my favourite.