New library for 2-ServoMotor based movement
i new forum (and arduino too), i've assembled parallax robot kit moves, ended creating small library provides convenient abstractions moving robot uses 2 opposite-configured servos.
i curious feedback, , if useful others:
https://github.com/kigster/backseatdriver
the main idea that library 1 sending commands servo motors individually, define how many microseconds should powered for, while library consumer uses simpler api move robot, this:
controller.forward(100, 500); // speed 100%, go 500ms
controller.stop();
controller.turn(45); // turn right 45 degrees
controller.back(50,200) // go backwards @ 50% speed, 200ms
controller.stop();
controller.turn(-90); // turn left 90 degrees
}
any feedback/comments welcome!
i curious feedback, , if useful others:
https://github.com/kigster/backseatdriver
the main idea that library 1 sending commands servo motors individually, define how many microseconds should powered for, while library consumer uses simpler api move robot, this:
controller.forward(100, 500); // speed 100%, go 500ms
controller.stop();
controller.turn(45); // turn right 45 degrees
controller.back(50,200) // go backwards @ 50% speed, 200ms
controller.stop();
controller.turn(-90); // turn left 90 degrees
}
any feedback/comments welcome!
a library calls delay() isn't going popular...
look how accelstepper library works scheme that's compatible with
blinkwithoutdelay() style of coding....
look how accelstepper library works scheme that's compatible with
blinkwithoutdelay() style of coding....
Arduino Forum > Using Arduino > Motors, Mechanics, and Power (Moderator: fabioc84) > New library for 2-ServoMotor based movement
arduino
Comments
Post a Comment