I am new to this forum (and Arduino too), but as I've assembled the Parallax Robot Kit into something that moves, I ended up creating a small library that provides some really convenient abstractions for moving a robot that uses two opposite-configured Servos.
I am curious about any feedback, and if something like that is actually useful to others: https://github.com/kigster/BackSeatDriver
The main idea is that that library is the one sending commands to Servo motors individually, which define how many microseconds it should be powered for, while library consumer uses much simpler API to move the robot, like this:
controller.forward(100, 500); // speed 100%, go for 500ms controller.stop(); controller.turn(45); // turn right 45 degrees controller.back(50,200) // go backwards at 50% speed, for 200ms controller.stop(); controller.turn(-90); // turn left 90 degrees }
Any feedback/comments are welcome!