The servoBUG provides a high precision six channel servo controller with support for variable speed control and programmable centre "tuning". The resolution can also be set from within your main program, giving support for 1us, and 0.25us (default is 1us). Don't be fooled by its small size - this is a high quality servo control unit. Need to control more servos? The servoBUG uses programmable addressing, which means you can use many servoBUGs in your project at any given time! For example, four servoBUGs will give you control over 24 individual servos - perfect for that next hexapod robot project!

This is a quarter size stickyBUG and occupies one quarter of a stickySHIELD. This means you can have four quarter size bugs per shield or you can have one half size BUG and two quarter size BUGs per shield. They can be stacked on other stickySHIELDs if required.

Sample Code


Setting Servo Speed

If you call setSpeed() with a parameter of 0, the servo will move as fast as possible. To slow down the servo sweep speed, we can calculate the speed variable needed using the following:

more simply

for example, if we want a full sweep in 500ms, then

so we use a speed value of 160. If we wanted full sweep that takes 5 seconds (5000ms) then the speed parameter would be 16.

Setting Servo Resolution

A call to the setResolution() routine in the servoBUG library will set one of four possible servo resolutions. These are:

ParameterResolutionServo RangeServo Centre

The default resolution is 8 (1us).