The Value of the Poti is send to a Java Application and then back to the Arduino to move the Servo. Shure this could be done easier by just using the Arduino, but I wanted to test the communication over the USB Serial Port.
In this example I'm using Strings to transfer the data, which is the best way if you need to adress more than one sensor or servo. Because of the de- and encoding of the Strings this might not be the fastest way, but you can build very complex data protocols.
Check out my tutorial to learn more about that stuff:
http://www.lauridmeyer.com/2012/05/ar...
On this page of the site you can watch the video online String based Commands for Arduino - Java communication using USB Serial COM Port with a duration of hours minute second in good quality, which was uploaded by the user Laurid Bergjohann 08 May 2012, share the link with friends and acquaintances, this video has already been watched 5,474 times on youtube and it was liked by 14 viewers. Enjoy your viewing!