How to convert frequent bang into zero or one?

Feb 8, 2013 at 8:49pm

How to convert frequent bang into zero or one?

Hi!
I am sending some data via the serial object from an Arduino to the Computer e.g an “A”.
All I want is as long an “A” is recieved a toggle box is set and vice versa. The problem is that I read out data from the serial object every 50ms (via qmetro) and this means that the output changes with that frequency, but I want a “solid state” like “A received or not.

How can I manage that?

– Pasted Max Patch, click to expand. –
#66401
Feb 8, 2013 at 10:43pm

Hi

[onebang]?

Brendan

#239028
Feb 8, 2013 at 10:50pm

maybe instead of using [sel 65], use [== 65] ->[change]->[toggle], so it stays on 1 rather continual bangs causing the toggle to alternate between 1 and zero

#239029
Feb 8, 2013 at 11:00pm

So when is it considered “Not A?”

– Pasted Max Patch, click to expand. –
#239030
Feb 8, 2013 at 11:19pm

introduces latency of course

– Pasted Max Patch, click to expand. –
#239031
Feb 9, 2013 at 12:17pm

Terry! Thank you, the latency solution works great.

Yours

Brantiko

#239032

You must be logged in to reply to this topic.