Thanks, Steve. I tried this, but as you said, it crashed because of the while loop. Also, I'm not sure if I'm using the context variables right. Could you take a look?
And do you have any suggestions on how I might go about getting my function to work?
I split my function into two, one to calculate pos values, and another to send it to the Arduino pin.
However, I'm not sure if I'm doing it right, and because of the while loop, I can't even get there.


