Servo control in Java
May 20, 2010
Hello everyone. I am making my first robot, and it's going to be a hexapod.
I have trouble with finances so I don't have most of the parts yet, and I have to make things work with parts I have before I can get more money from my club for other stuff I need.
I have 3 CARSON CS-3 502015 servo motors and Intellibrain board (I've got it for robotics competition). I program it in Java becouse it doesn't support anything else, and compiler I use is RoboJDE.
Now for my problem. RoboJDE doesn't give code for commands, only explanation on how to use them. And there is only one command to use servos, which accepts integers from 0 to 100. When it gets 50 servo is on the middle, and when it gets 100 or 0 servo is at 45° to on side. I need a code for Java that controls servos so I can use them in atleast 180°, and preferably more precisely than 1° steps. I have never worked in Java before, except for competitions with these robots, but I know how to work in C, if that helps.
Thank you for your time to read this, and I'm sorry for my bad english, it isn't my main language.