CodeBug Blog

News and stories from The CodeBug Team

CodeBugs moves with servos!

As you may have noticed we've recently been adding loads of new features into CodeBug, including the abilities to make music, read analogue values and generate random numbers. Today we’re announcing another new feature: Servo control! Get started with this servo activity. “What is a servo?” we hear you ask.

A servo is a precise motor that can rotate a certain number of degrees (usually 180°) and it is great for making waving arms, cranes or even robots.

Servo penguin

We had a go at making our own CodeBug penguin with colourful stick-on arms and legs. The servos rotate back and forth waving the card cutouts in a kind of crazy dance. Click here to print out your own! CodeBug robot graphic

You can use servos by setting CodeBug's legs into digital output mode and adding a set servo block to your project from the new Servo block menu. You can use a servo on any of CodeBug's four legs (and also the extension pins, see below).

Servo blocks

Another feature we've also added is the ability to control the extension pins from the block interface (you could always control them when tethering with Python). This means you can control up to 8 servos, although with this many you will need to power them separately. To use the expansion pins, click the blue cog on the start block and tick the checkbox next to extension pins input/output.

We are looking forward to seeing the amazing moving projects you create with these new features, please Tweet us the pictures :)

Back to top