I've been working on this project for a while and it's getting there. I was messing around with a sample piece of code online that read a potentiometer's value and changed the screen color accordingly (from 0 to 255, which is from brown and then blue, then violet).
Now, I'm curious as to how I can do this with an accelerometer/gyroscope.
Let's say I was using solely the X axis. If the value is positive, the screen on processing point an arrow to the right and when it's negative it points left.
What if I had 2 axes? How might I do this in Processing? I was thinking of printing the values via Serial.print() and having them print as follows:
X: Y: X: Y: ...
How might I approach this on Processing? Maybe set x to have an even index or something and if it's modulo is > 0 then it's probably a Y value. And from there it acts accordingly
I wouldn't be surprised if this is vague, but I hope people can help me