ADXL345 graphing program in Processing

OK, so I got this nice little sensor, the ADXL345 and I have composed it into a new version of my "shield".

ADXL345_PCB_____popsan__.jpg

 

ADXL345_PCB.jpg

To learn to use it, I wrote a simple Arduino sketch and a Processing program to display the values, Arduino got from the sensor. As you can see, the program is only displaying 2D vector, although the ADXL345 is a 3D sensor. It is so, because I'm planning to use only the two axes for 2D mapping and orientation and the third (Z) axis to get the inclination of the bot, if that is even possible...

So the program has two display modes - either it displays the 2D vector of X and Y acceleration or the size of the vector - the total acceleration.

If you are interested in seeing the code behind this, I can post it here or submit the sketches, but I would have to rewrite it with comments and in english (so far it is partly czech...). And generally make it prettier :)

By the way, I recommend using higher resolution for the video, because youtube has compressed it brutally and the lines are barely visible...
Edit: OK, I think its better now with some tweaking in the youtube editor.

https://www.youtube.com/watch?v=raPeSpjh3qM