Simple Animation With Codebug


CodeBug’s sprites can be shown one after another to create simple animations. These can bring your sprites to life by showing movement and progression.

Follow the sprite activity for more information about sprites.

You will need
CodeBug CodeBug
Micro USB cable
CR2032 battery

Designing your animation

It is best to plan out your animation so you know how many frames you want and to see how the animation should change over time. Print out this template and use a pencil to colour in which LEDs you want switched on. Try to think how it will look changing from one sprite to the next, but you can always tinker with it later once you see your animation on CodeBug.

Here is an example animation of a detonation plunger and explosion.

Writing your program

Now that your animation frames are ready, you can program up your bug. You will make CodeBug display your animation when a button is pressed. Follow the tutorial below.

What next?

Using the buttons and input legs on CodeBug, you could create a short interactive animation where, by playing different animations depending on which button is pressed, you allow the user to choose what happens next!

Back to top