Hallo,
I know this maybe too hardware concern issue,
but since I am testing the new firmata with the [arduino] object, and maybe this could interest other users, I think this could be a topic of interest.
My doubt is: how to get a *totally* not flickering analog input with more than 64 steps?
I always had the flickering problem even putting other pins to the ground...
generally I do
[inlet] | [/8] | [int] | [change] | [outlet]
I use 10k potentiometers, without resistors in the input...
Does anyone get this input without any flickering? what's the secret?
thanx
glerm
glerm soares wrote:
Hallo,
I know this maybe too hardware concern issue,
but since I am testing the new firmata with the [arduino] object, and maybe this could interest other users, I think this could be a topic of interest.
My doubt is: how to get a *totally* not flickering analog input with more than 64 steps?
I always had the flickering problem even putting other pins to the ground...
generally I do
[inlet] | [/8] | [int] | [change] | [outlet]
I use 10k potentiometers, without resistors in the input...
Does anyone get this input without any flickering? what's the secret?
How much flickering are you talking about? You will always have settings with the least significant bit toggling no matter what your resolution. Short wires and good ground help, as well as clean connections. I found that a 0.1uF capacitor on the analog input can damp high frequency noise on the wire. Also 10k is at the upper limit for an analog input. Try 1k: a lower source impedance is quieter.
Martin
On Fri, 13 Feb 2009, glerm soares wrote:
My doubt is: how to get a *totally* not flickering analog input with more than 64 steps?
Even if you have only two steps, if the value is exactly on the limit, even the tiniest noise will make the input flip from 0 to 1 and back, endlessly.
The solution is then to use some kind of modified [change] that uses a confidence interval.
So when you output an y, you also need to set a pair of [moses] so that it can find numbers outside of the interval y-c < x < y+c, or equivalently, abs(x-y) < c, where c is the minimum amount of change that you want to hear about.
If you are in a two-dimensional system, it's better to consider pairs of inputs together as being one thing, and so for inputs (x,y) and outputs (u,v), check for hypot(x-u,y-v) < c, or equivalently, (x-u)*(x-u) + (y-v)*(y-v) < c*c; that way, your system will be independent of the angle of change.
[change] itself can be replaced by a very small abstraction, and those two modified versions that I suggest, are not much bigger than that.
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec
thanks matju
So when you output an y, you also need to set a pair of [moses] so that it can find numbers outside of the interval y-c < x < y+c, or equivalently, abs(x-y) < c, where c is the minimum amount of change that you want to hear about.
I did it in with:
#N canvas 0 0 450 300 10; #X obj 38 -73 delta; #X obj 37 -50 abs; #X obj 141 -72 sel 1; #X obj 94 -96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 40 -100 change; #X obj 94 -63 f; #X obj 98 -30 outlet; #X obj 40 -127 inlet; #X obj 179 -126 inlet; #X obj 141 -94 >= $1; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 0 0; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 7 0 4 0; #X connect 8 0 9 1; #X connect 9 0 2 0;
is that what you meant?
salut
glerm
thanks matju
So when you output an y, you also need to set a pair of [moses] so that it can find numbers outside of the interval y-c < x < y+c, or equivalently, abs(x-y) < c, where c is the minimum amount of change that you want to hear about.
I did it in with:
#N canvas 0 0 450 300 10; #X obj 38 -73 delta; #X obj 37 -50 abs; #X obj 141 -72 sel 1; #X obj 94 -96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 40 -100 change; #X obj 94 -63 f; #X obj 98 -30 outlet; #X obj 40 -127 inlet; #X obj 179 -126 inlet; #X obj 141 -94 >= $1; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 0 0; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 7 0 4 0; #X connect 8 0 9 1; #X connect 9 0 2 0;
is that what you meant?
salut
glerm
Hi glerm,
I'd put a [t b b] after your [change]
gr, Tim
thanks matju
So when you output an y, you also need to set a pair of [moses] so that it can find numbers outside of the interval y-c < x < y+c, or equivalently, abs(x-y) < c, where c is the minimum amount of change that you want to hear about.
I did it in with:
#N canvas 0 0 450 300 10; #X obj 38 -73 delta; #X obj 37 -50 abs; #X obj 141 -72 sel 1; #X obj 94 -96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X obj 40 -100 change; #X obj 94 -63 f; #X obj 98 -30 outlet; #X obj 40 -127 inlet; #X obj 179 -126 inlet; #X obj 141 -94 >= $1; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 2 0 3 0; #X connect 3 0 5 0; #X connect 4 0 0 0; #X connect 4 0 5 1; #X connect 5 0 6 0; #X connect 7 0 4 0; #X connect 8 0 9 1; #X connect 9 0 2 0;
is that what you meant?
salut
oops, that should be [t f f] ofcourse :) see this attachment, ignore previous
On Sat, 28 Feb 2009, glerm soares wrote:
I did it in with: #X obj 38 -73 delta; #X obj 37 -50 abs; #X obj 141 -72 sel 1; is that what you meant?
No, it only outputs when there is a large enough difference to the previous input that was not exactly the same. What I mean is to only output when there is a large enough difference to the previous output.
Btw, what's [delta] ? I suppose you can do it with just a [t f f] and a [-] ?
What I mean is something like this:
#N canvas 497 97 450 300 10; #X obj 9 8 inlet; #X obj 9 46 -; #X obj 9 65 abs; #X obj 9 84 moses $1; #X obj 60 9 inlet; #X obj 9 27 t f f; #X obj 80 132 f; #X obj 80 113 b; #X obj 80 151 outlet; #X connect 0 0 5 0; #X connect 1 0 2 0; #X connect 2 0 3 0; #X connect 3 1 7 0; #X connect 4 0 3 1; #X connect 5 0 1 0; #X connect 5 1 6 1; #X connect 6 0 8 0; #X connect 6 0 1 1; #X connect 7 0 6 0;
_ _ __ ___ _____ ________ _____________ _____________________ ... | Mathieu Bouchard - tél:+1.514.383.3801, Montréal, Québec