Forum

First value

Probably a simple question… how can I determine which of two bang gets there first? The order defines the direction left or right.

First.v4p (7.5 KB)

There’s probably a dozen different approaches to this, find some attached …
The two solutions to the left will tell you the index of the last bang, once a set of two is completed (so take the other then).

The solution to the right will tell you the index of the first bang the moment it occurs already, you won’t have to wait for the second bang.

First_2.v4p (19.6 KB)

Thanks for the patch, in principle it works well, but in my use case i still get errors sometimes. to the background, i try to read out a simple digital potentiometer sensor.

Partly the distinction between left and right is not correct and logic tells me left although turning right.

The direct evaluation via the arduino example code (see link) works better. The arduino code still has a logic query in it that I don’t have? Or is there already a finished patch for digital potentiometer sensors?