Firmata-Arduino example patch from beta to gamma

Hello community, I´m trying to translate a patch I found in the book “Prototyping interfaces-Interaktives Skizzieren mit vvvv” to get started with arduino. Unfortunately everything is in beta and I don´t seem to get the logic. Anyone has an idea what I have to change?

p.s. sorry the book page is in german …

the beta version:

my attempt in Gamma:

Hi BesNor,

I guess it will look like this:

image

PinValues pin of the FirmataDevice node takes a sequence, that’s why an Output of the DigitalWrite should go through the FromValue node. If you want to write several pins, just place several DigitalWrite nodes and use Cons node to join them into a spread and connect this spread to the PinValues input.

On the Output side, use DigitalRead node, it takes a spread of indices that should be read. In this example only one pin is of the interest, so its Index again goes through the FromValue to make a spread out of it. The DigitalRead returns a spread with one value and FirstOrDefault returns this single value.

If you want to read several pins at once you could connect a spread of indices to the DigitalRead.

Check also HowTo Digital Read-Write from the Helpbrowser (F1).

Best,
Anton

Firmata-Forum-Read-Write.vl (10.4 KB)

2 Likes

Thank you so much, Anton! That solved it perfectly :)