Compare incoming serial data

Hello, i am reading out a positionsensor with an arduino and get an incremental number.
I see the number coming in. Now i would like to compare the incoming number with the previous number.
i tried to trigger a s+h node with the “on data” pin of the RS232 node but that does not work. I get a sample but the comparison/check does not work.

Any ideas? Thanks!
gk

Try the ‘FrameDifference’ node

You are comparing the incoming value to itself.
Use the output of s+h via a framedelay to go into the leftmost as value. The you compare the current value to the previous one.
Note though that the result will only be present for one frame. You could another s+h to hold it longer.

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