Objective of the lesson Use Blockly to create Animations All of you will: Create an image using the LEDs Most of you will: Create an animated image using the LEDs Some of you will: Control the image using the buttons
Go to www.codebug.org.uk Click on CREATE and then on the Blockly Tab You will see a simulation of the Codebug. The Triangular Play button can be used to run your program and view what will happen once you download to your Codebug
We will make an animation Add a repeat while true loop to keep the animation going forever
Add a draw sprite block Keep the x,y at 0,0. This means that the animation will start on the bottom left
Add a build sprite block Tick the LED pixels that you want to come on
Add in a second draw sprite and build sprite block Draw a second image The problem will be that the images will play immediately after each other
Add in pauses inbetween each of the animations Add in pauses of 1000ms (1 second)
Challenge Change the lengths of pause between the animations Add in additional animations Make the animations come on only if button A is pressed Make a different animation come on if button B is pressed
Answers