Skip to main content

Introduction

Learn how to use the Sparkle module by creating some starting lights for a race around the planet.

  1. Sparkles are very useful - they are LEDs, just like the red/green LED from before, but much cleverer! They have small chips inside them, which allow you to control many LEDs using just one output. If you look really closely you might be able to see them.
    • Sparkles are very useful - they are LEDs, just like the red/green LED from before, but much cleverer!

    • They have small chips inside them, which allow you to control many LEDs using just one output. If you look really closely you might be able to see them.

    • They are also three LEDs in one - there is a red, green and blue LED in every sparkle.

    • We can control these three internal LEDs separately, and mix them together to create any colour!

  2. Build up your robot like the picture.
    • Build up your robot like the picture.

    • Sparkles must always be plugged into output D - this is very important as otherwise they won't work!

  3. All the blocks we need for sparkles are in the sparkles menu. Click on it and have a look at all the new blocks you can use.
    • All the blocks we need for sparkles are in the sparkles menu. Click on it and have a look at all the new blocks you can use.

    • For now, let's test the sparkles by building the simple program in the picture - hopefully they all turn red when you program your robot!

    • Don't stare at the sparkle board for too long - it's very bright!

  4. It's really easy to control the red, green and blue LEDs separately to make any colour we like.
    • It's really easy to control the red, green and blue LEDs separately to make any colour we like.

    • Click on the red square to bring up the colour picker - try a few different ones and see how they look!

    • Switch off your junior main board between programs to save battery life!

  5. Remember, we can also control each sparkle individually! We can use the set sparkle 0 block to change just one sparkle's colour
    • Remember, we can also control each sparkle individually!

    • We can use the set sparkle 0 block to change just one sparkle's colour

    • In programming numbers start from 0, not 1 - so for three sparkles, the first is 0, the second is 1 and the last is sparkle 2.

    • Use three of the individual sparkle set blocks to set each of your three sparkles to a different colour.

    • Let's make a set of starting lights for a race across the planet surface.

    • Check out the F1 starting lights in the video - can you put together a program using sparkle and wait blocks to make your own?

    • The lights should turn red 1 at a time, then all go green at the same time.

Finish Line

One other person completed this guide.

Tech Camp

Member since: 10/03/2012

119 Guides authored

Team

Tech Camp Staff Member of Tech Camp Staff

6 Members

140 Guides authored