reduce number/data frequency

Mar 17, 2011 at 12:38am

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 : )

#55607
Mar 17, 2011 at 12:42am

look at the speedlim object

#199991
Mar 17, 2011 at 12:49am

cheers jonathanb : )

#199992
Mar 17, 2011 at 8:04am

Hello,

average flow ?

– Pasted Max Patch, click to expand. –

HTH

#199993
Mar 17, 2011 at 8:34am

i have found Matt Wright’s ‘Lbyl’ object quite useful for tasks like this.

http://cnmat.berkeley.edu/downloads

#199994
May 3, 2011 at 7:34pm

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?

– Pasted Max Patch, click to expand. –
#199995
May 3, 2011 at 7:42pm

I would look into [bucket] if I were you. there might also me a [zl] implementation for that, can’t remember right now…

#199996
May 3, 2011 at 7:46pm

here is an old abstraction that implements a circular buffer type thing. have a look, might be useful to you. in particular look at the helpfile under “mean-example”.

Attachments:
  1. MRcircBuff.zip
#199997
May 3, 2011 at 7:49pm

An old thread where a bunch of methods are compared:

http://cycling74.com/forums/topic.php?id=15180

#199998
May 3, 2011 at 9:37pm

Thanks! Good to know them. Now I just have to pick my favourite.

#199999

You must be logged in to reply to this topic.