I got following problem:
receiving values from a controller (slider 0-255) and want to use just range 100-200 for controlling a servo
I mappe/clipped the incoming to be clipped outside of 100-200 and mapped that to out 0-1
working fine sofar, but:
sometimes its missing values coming in and therefore servo jumps to the lowest value (e.g. 0)
also when I receive values below 100 it jumps to the lowest point
how can I do it that this servo completely ignores values outside of its range (100-200) and does therefore nothing ?
Tried it with a PID node - but thats too much for me - have no clue about that
Was also thinking about something if-else ?
I did
“I mappe/clipped the incoming to be clipped…”
It also jumps to the lowest clipped range when it receives values outside of his range
thats exaclty my problem
values outside of predetermined range are not ignored unfortunately
If you are trying to completely ignore slider values outside a specific range (i.e. a flaky pot sometimes jumps to min or max value), then clip/map isn’t going to help because it will still jump to min/max allowed value. In this case, you want to completely ignore the slider min/max values and keep old values while receiving invalid inputs. The gate node mentioned by evgenykochetkov allows you to do this. Only enable the gate when values are within specified range, then feed the map node from the gate. With this config, it shouldn’t be necessary to use server’s UPD pin. Alternately, you could only pulse the servo UPD pin when slider values are in range & feed all values to map (since out-of-range values will be ignored by servo).
oh, I did not know gate kept the value that’s why I made some latch
Now with respect to the value, if you take it from an analog port, you must map it, is that so?
then with beetwen and gate eliminates the jumps, correct?
thanks to all of you - thats exactly what I figured out right now as well
clip/map is not the solution
I did the same - a simple between that triggers the gate and feeds than a mapping
on top I used your servo enable node and fed his enable pin also from the between
an I can confirm between node eliminates 100% everything outside the range