Switch on/off

hi all
i would like to make a switch to turn on/off controlled via a joystick button
however, the button is sending data (1) everyframe, which has the effect to turn my switch on/off repeatidly .
I would simply like a switch that sets itself to 1 when i press the button, and stays to 1 when i release the button, and the next time i press it, it goes back to 0…
Could one of you expert give me a quick help on this ?

connect your button to a togedge and the first outputput of the togedge node to a toggle node.

i´m not into that joystick stuff but it sounds like simple toggling you want to do? if so, try a TogEdge “UpEdge out” -> Toggle.

because i needed this combination so quite often, i did myself a small module “Tog”.
put it in vvvv\modules\bbb\

if i got u wrong and i missed topic, i´m sorry -> but dont call me a spammer (:

greetinX, b³

edit: uhm, less texting would make me the first anserer hehe… glad to have the forum back

Tog (Animation).v4p (2.0 kB)

bigbabou, this is EXACTLY what i needed
thank you very much.

–> coming from QuartzComp, i’m very used to counter nodes and modulo operations, so sometimes i’m a bit confused with vvvv… just the time to jump in ;)