things you will need

The following items from the Discover Computing kit:

  • 1 x Crumble
  • 1 x Battery pack
  • 1 x Sparkle baton
  • 1 x Button switch
  • 3 x Red croc leads, 2 x Black croc leads, 1 x Green croc lead, 1 x Yellow croc lead
  • 1 x USB cable

A computer with a USB port and the Crumble software installed.

Plus,

  • 1 x box
  • 4 x colouring pens (different colours)
  • Card and felt
  • Sticky tape
  • Scissors
1

Prepare the box

  • Use the scissors to make a hole in the middle of the box.

  • Use the scissors to make another hole in the bottom left-hand corner of the box.

2

Connect the Crumble to power

Use one red croc lead and one black croc lead to connect the Crumble to the battery box.

3

Add the output

  • Attach one red croc lead, one black croc lead and one green croc lead to the connectors on the right hand side of the Crumble (as shown).

  • Push each croc lead (one at a time) through the hole in the middle of the box (keeping hold of their jackets).

  • Attach the croc leads to the connectors on the left hand side of the Sparkle baton (as shown).

     

4

Add the input

  • Attach one red croc lead to the remaining positive (+) connector on the battery box.

  • Attach one yellow croc lead to the A (input/output) connector on the Crumble.

  • Push each croc lead (one at a time) through the hole in the bottom left hand corner of the box.

  • Attach the croc leads to the button switch (as shown).

  • Secure the button switch so it lies flat against the box.

5

Make the chore board

  • Use some sticky tape to secure the Sparkle baton in place.

  • Draw a vertical line on the box after every second Sparkle.

  • Write the names of your family on the box above each group of two Sparkles.

  • Make a cover for the button switch using card or felt.

  • Secure the cover on top of the button switch using sticky tape.

6

Decide on the chores

  • Select four chores for you and your family.

  • Use the pens to create a colour coded chore chart.

  • Attach the chore chart to the box using sticky tape.

7

Connect the Crumble to a computer

Use the USB cable to connect your Crumble circuit to a computer with the Crumble software installed.

8

Code the Crumble - Create Suspense

  • Snap a ‘do forever’ loop to a program start block.

  • Tell the Crumble that IF the button is pressed (A is HI) THEN cycle the sparkles through the colours of the rainbow 3 times before turning all sparkles off.

  • Send your code to the Crumble and press the button on the chore board to test it out.

9

Code the Crumble - Variables

  • Create two variables – one called Person and one called Chore.

  • Assign the Person variable a random number between 0 and 7.

  • Assign the Chore variable a random number between 1 and 4.

1 0

Code the Crumble - Light Up the Sparkle

Next, you will need to tell the Crumble which Sparkle to light up and in what colour.

  • Tell the Crumble that IF the Chore variable is equal to 1 THEN turn the Sparkle ON that:
    • matches the random number generated for the Person variable; and
    • set the colour to BLUE (or whichever colour you have selected for the first task on your chore chart) for 5 seconds.

ELSE

  • Tell the Crumble that IF the Chore variable is equal to 2 THEN turn the Sparkle ON that:
    • matches the random number generated for the Person variable; and
    • set the colour to RED (or whichever colour you have selected for the first task on your chore chart) for 5 seconds.

ELSE

Repeat for chores 3 and 4 but use an IF – THEN – END IF block for chore 4.

1 1

Code the Crumble - Reset the Chore Board

Tell the Crumble to turn the Sparkle off (using a ‘turn all sparkles off’ block) to reset the chore board.

1 2

Set-up the chore board

  • Send the completed code to the Crumble using the green triangle.

  • Unplug the USB cable from the Crumble and close the box.

  • Press the button to try it out.

What chore did you get or did you escape this time?