Control video with arduino

Hello everyone,

I am new to vvvv and very excited to use it in an upcoming installation. My am is to change the direction of a video with a switch button connected to arduino. I have the patch (determining video movement) set to be activated by a toggle. I want to connect the toggle to arduino (ex. when switch on - (toggle on) video plays forward / when switch off - (toggle off) video plays backwards). I have the switch connected to Digital pin 4, yet I do not see any values changing when I trigger the switch. Any recommendations on how I can receive values of 0/1 from a button ?

hey eda,

maybe you could show us what you’ve done so far ? kinda hard to tell just like that.

Hello eda,

Double check your hock up and make sure you have Standard Firmata uploaded on your Arduino.
So far its not vvvv related! at least without seeing your patch as sebescudie mentioned.
Then there are a few options for reversing a video depending on your context such as resolution/sound/etc… .

Thank you for your abrupt answer. I realized there were too many 'switch’es in my question…

I attached two screen shots next to each other. The one on the left will show you the video patch with arduino connection patch embedded. You can see that I have the ‘value on pin’ to be connected to the toggle at the top. (but the value is always 0)
The one on the right shows that I am trying to get the value from pin 4 with ‘get slice’ but still the value doesn’t change.

I might be missing something in between. I hope these screenshots would clarify my issue.

Hi eda , try this. (127.8 KB)

Thank you colorsound for sharing the file. Now I can get a string value from arduino in vvvv.

My next question is how can I convert a string value into an integer or connect it to the toggle button ?

![arduino_string|579x670](upload://p2otmma99FMqLuKPqbpAQg9Gydl.jpeg) This screenshot may be better in explaining what I mean. (i tried get slice but I don't think it works in this situation)

I would appreciate it if you have any suggestions on this


the image on the prior message didn’t work, so here it is again

Hi eda, try asvalue node, togedge node and toggle node one after the other.


Hi colorsound, Thank you for the layout.

It seems to be working, but just recognizing the trigger in the beginning or in intervals (so the toggle flickers)
I need the toggle button triggered with arduino until the switch is off.
(in arduino, I can get a clear output data of 0s and 1s)

So can I boolean the output so that it either stays as 0 or 1, but not register once or every ‘1’ it receives ?

Thank you

This image may help explain the issue. ( as you see the output string data is continues, whereas the asvalue output registeres once, and contiues as 0 afterwards)


Hi, add a toggle node after what you have in the picture.


As you see in the picture, there is a toggle node at the bottom. But I was wondering if I can get a continuous toggle switch as I trigger the arduino.

As the string value shows 1 1 1 1 1 1 1 1, still have the trigger switched. Now it just flickers for the first 1 value. it receives.

Thank you

You mistaken the toggle node with the toggle io box.

I see. I’ve added the toggle node.

What I want to figure out is to convert the string data (output from arduino) into an integer/number/value.

In the patch, I can connect the string to asvalue. But when triggered it only outputs the first 1 followed by 0s. Perhaps I need to change that node, but can’t figure out how to use the string data as the value input.

Thank you

Hi everyone, I adjusted the code on the arduino end and now I have a smoother connection to vvvv and the patch works perfectly.

Thank you for all your help during this process !

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.