I am trying to control my servo with Processing. And it actually works.
But I wanted to fool around with the code a bit to get a grip off it, and I started changing a tutorial code a bit.
And I ran into a wall which I can not figure out.
Originally window size is (256x150) and I have tryed to change it. When I expanded or shrunk the Y axis, it was all good.
But when I expanded the X axis the problems occurred whether I was shrunk it or expanded it. It gave me a border inside the window, and when I crossed it with mouse, the servo jumped back to 0 position, telling me that it mouseX read a 0 again, though I haven’t reached the end of my window.
This is my code:
I have altered my Arduino code, and it works OK. It seems that I ran into some sort of boundary in Processing.
Anyone knows what I did wrong?
Picture depicts, how my window looks like.