Author Archive | Daniel

I’ve Got a Starter Kit – what next?

You’ve been lucky enough to get your hands on a Crumble starter kit, you’ve connected bits together and managed to get a Sparkle shining red, but now what? What else can you do with it apart from make a red light?

We’ve decided to collate a list of inspiration and ideas for projects that you can make using only the contents – and container – of the starter kit.

We’ll start with the simpler projects, before looking at a couple of more advanced ones. First up we have a simple timer. This can be made as simple or advanced as you like, but the main premise behind it is that a timer for 30 seconds will start when you press the button.

The program is simple. Wait until the button is pressed, turn on the Sparkle white, then after 30 seconds, turn it off. The program then repeats, waiting for the user to press the button to start the timer again. This could easily be extended by adding in a nice pulsing effect every second, getting faster near the end of the time limit.

Next up we have the classic ‘police lights’ project. You can start off by making only the lights, which you can then ’embed’ into a model police car. If you are feeling particularly creative, you could use the starter kit box to make a chassis, which you can then turn into your own ‘moving’ vehicle! As a starting point, we want to make the two sparkles alternate between red and blue. This could then be elaborated on, to create extravagant flashing patterns, or even use the switch to cycle between various styles!

This is one of the simplest, yet most satisfying programs! To represent police lights, we turn the Sparkles on red and blue, then after a short time, we switch their colour.

Now we have an example of a simple project, with a bit more ‘making’ involved. The lightbox is made using either the starter kit box, or another box, and a piece of paper. We then can light up the message using the supplied sparkles. To make the programming more difficult, we can control the lights via the switch, make them change colour or even fade through the RGB values.

The programming for this project is surprisingly simple, once you know how. We are going to wait for the button to be pressed, and A to become HI. Then we’ll turn on the Sparkle(s) white (you can use as many as you like with this code!). Then, each time the button is pressed, the Sparkle(s) changes to another colour, or off. The wait statement allows us time to remove our finger from the button, setting A LO. If we didn’t have it, the program would skip through repeatedly, as it runs faster than we can move!

For our final basic project, we have our very own model Zebra crossing, complete with flashing Belisha beacons! Using most of the starter kit box as the ‘crossing’, we’ve made two beacons out of  some of the lid from the box. Programmatically, this isn’t too taxing – its an infinite loop, alternating each light.

This code is nice and simple – set one Sparkle to Orange, and the other one off. After one second, switch them around so that the orange one turns off, and the one that’s off turns on orange. Wait another second before repeating. This will then give us the effect of them flashing alternately.

Now we move onto some projects for those of you who are more experienced. First up, we are going to look at a simple reaction time gamer. One Sparkle will light up after x milliseconds, then you have to press the button as quickly as you can. Within a set amount of time, and you get a green on the other Sparkle, but too slow and you’ll get red.

Now that we have moved onto something more complicated, the code has gotten longer, however, it is just as easy to understand! This program waits a random amount of time (0.5 – 3.5 seconds) before turning on the Sparkle white. It then ‘times’ us by adding 10 to our ‘Time’ variable, every 10ms, until the switch is pressed. If we took less than 350ms, we get a green flashing Sparkle, but if we took longer, it goes red! If you have a Sparkle Baton, check out this project.

On the theme of reaction-based games, we have our ‘Sparkle Snap’ game – The two Sparkles light up a random colour (from a predefined list), if they match you must press the button as quickly as you can. Succeed, and you’ll be rewarded with flashing green Sparkles. Get it wrong, and you’ll get red.

We’re starting off by lighting each Sparkle one of three colours. We’ve assigned ‘ColourOne’ and ‘ColourTwo’ a random number between 0 and 2, and then using selection (if statements), we’ve lit the Sparkles depending on the variable values. It’s worth noting that this section could be far longer, if you want a wider range of colours. The Sparkles are then on for either 500ms or until the button is pressed. If the time elapses, the game just continues, whereas if the button was pressed, we check to see whether the two colours (variables) are the same. If they are, then we flash green for 2.5s, if they weren’t, then we flash red for 2.5s. This game could be taken a lot further if you wanted too – making it get faster after each correct guess, adding in a penalty if you miss a pair etc.

Next up we have a slightly simpler project to the previous two – morse code. Using a Sparkle, it is possible to flash an array of messages, using morse code. This one is fairly self-explanatory, and using a variety of wait statements and repeat loops, it is easily achieved.

This is the less efficient way of making this program, but it works nonetheless! Put simply, we have flashed our Sparkle based on something in Morse Code. This is achieved by using the wait statements, to correctly display a dot, dash, the gap between letters and the gap between words. If you want another starter kit, ‘code’ based Sparkle project, check out our Lighthouse.

Finally, we have another ‘maker’ based project, using the starter kit box (or other). By colouring the box in black, and poking some carefully placed holes, we can easily make a ‘constellation’. We can then add some realistic twinkling, by randomly choosing shades of bluey-yellowy-white. Although simple to make, it is a nice programming exercise using repeat loops and variables.

Our last code segment is actually quite simple. By defining the range of various random number blocks, and placing them in the RGB sections of the Sparkle variables, we can define a random set of colours. Then, by waiting a random amount of time for changing them, we can get a realistic twinkling effect!

There are numerous possibilities when it comes to deciding ‘what to make’ using the starter kit – many more than we’ve listed here. Hopefully you’re now feeling more inspired, and have some fantastic ideas of what to make at home, or with your class. If you have other Crumbs and components laying around, don’t forget to head over to our Projects to see what else you can make.

Have a cool idea that we’ve not listed here? Please don’t hesitate to drop us a message on our contact us page, or Twitter!

A Crumble-Powered Automatic RGB Nightlight

Sometimes inspiration can be hard to come by. We have known for a while that we’ve wanted to make a nightlight, but didn’t know how to make it different from all the rest.

We stumbled across an interesting video on YouTube which peaked our interest and gave us the inspiration we needed. How awesome would this nightlight look if we added a whole heap of Sparkles (a Matrix display) and gave it a Crumble kick?!

The Crumble-powered RGB nightlight was born.

Although this post will be a whistle-stop tour of the process, when we have our finished Sparkle Matrix display, we will definitely work on some in-depth instructions and teaching resources.

We started off by preparing a cardboard box, by removing all of the sellotape. We then glued it back together, to make sure that it was sturdy.

We then cut the faces of the box off, leaving a border. This would give us the frame for our light.

After this, we drew some straight lines on a word document and printed off 5 copies. We then trimmed each sheet so that it could be glued inside the 5 faces of the frame.

When we had finished our light, we decided that we didn’t like the bare cardboard, so we used a silver permanent marker to give it a metallic look.

Wiring up the Crumble was simple enough.  After connecting the Sparkles (inside the shade), we connected a light-dependent resistor (LDR). One end connected to a + output, in this case from the batteries, and the other end connects to an input (A, B, C or D). We used A.

It’s really easy to use an LDR with the Crumble. Take a look at the following program. When the analogue value of the LDR (we’ve renamed it to be helpful) is above 90, turn all of the Sparkles off,  if it isn’t above 90, and therefore less than it,  then turn the Sparkles on.

To get the nice RGB effect, we have cycled through the red, green and blue values.  This graph shows how increasing or decreasing the different values gives us different colours. Doing it in this particular order gives us a lovely rainbow effect!

We have created variables called Red, Green and Blue. We then set the corresponding red, green and blue Sparkle values to our variables. We have cycled up/down the RGB values to give us our transition of colours. Each time the colour changes, we check to see the value of the LDR, and whether or not to turn the lights on/off.

And here is our RGB nightlight, in all of its glory! When the Sparkle Matrix gets finalised, we will create some more in-depth teaching resources for this project, as it’s easy to make and really satisfying.

Getting to grips with the Crumble line follower

We often get asked questions about how to use the line follower with the Crumble, so we thought that we’d provide some updated examples on how to use it.

For those of you that aren’t familiar with it, the ‘Crumble Line Follower Widget‘ is a small board with two infra-red sensors in. Their resistance changes depending on the colour/ amount of light they sense. This means we can use the analogue values on the Crumble, along with some motors, to make a buggy follow a line!

There are many different ways to program a line-following buggy, and we are going to have a look at these. It is worth noting before we go any further, that there are many factors that can influence how successful your line-following adventure will be. Everything from how white your surface is, how reflective it is (for infra-red), how close the line follower is to the surface, to how charged your batteries are.

First of all, we need to wire up our Crumble and line follower. If you look at the back of your buggy, the right motor needs to connect to the motor two pads (red + and black -). The left motor connects to the motor 1 pads, but because the motor is flipped we need to reverse the wiring so that the ‘forwards’ block still makes the motor move forwards. So we will connect the black to + and the red to – . The line follower then needs connecting. The power (+ and -) connects to the corresponding pads on the Crumble or battery box and then the ‘left’ and ‘right’ pads need connecting to two of the I/O pads e.g. A and B.

note: This may be different depending on your motor configuration/set up. If you are in doubt have a play and find out!

Method One: The Simple One

We will first look at the shortest and simplest way of getting the line follower to work. This method links the analogue values with the corresponding motor speeds.

There are occasions when this technique doesn’t work so well – it will depend on the materials you are using and how tight the ‘track’ you are following is!

Method Two: Treating Them Digitally

The next method treats the inputs digitally – so that the readings are either HI or LO. If the left or right are reading low, we only want the opposite motor running. Or when a side is on white, we want that motor to keep running.

Method Three: Analogue Alternative

When the digital method doesn’t work correctly, whether it is the surfaces you are using, or the height of the line follower from the floor, we can use analogue values instead, to achieve exactly the same effect.

Method Four: Comparing Left & Right

The other methods we are going to look at rely on comparing the left and right values to one another. This one works as follows: If the left analogue value is less than the right one,  gradually turn left- else gradually turn right. The motor speeds can be adjusted depending on the complexity of your course.

Method Five: Joseph’s Brainchild

The other comparison method we are going to look at is the brain-child of Joseph, the Crumble’s creator. It involves finding the difference between the left and right values, and then adding/subtracting from the relevant motors.

These five different programs are just a snapshot of the vast number of ways you can program a line follower. If you wanted to use a white line on a dark surface then it is just a case of inverting the motors, or the comparisons.

Crumble heads to the Education Show

Last week, a few of us travelled up to the NEC, Birmingham for the Education Show. We were there mainly to exhibit the Crumble as the show tends to be geared towards Primary and Home Educators – and the Crumble is perfect for Primary Computing and Design and Technology. Loads of people had a go with the Crumble and there was a real excitement surrounding the stand.

We were sharing our stand with Mike and Beckie from UK STEM – they were launching their fantastic new initiative called ‘The Global Stem Award’ which you can find out about here.

When the show had quietened down, we even found time to set each other some Crumble challenges!

We thoroughly enjoyed our time at the show and it was great to meet so many new and familiar people, all of whom share our excitement and passion for education. We look forward to the next one.

Getting Musical with the Crumble

A Crumble powered instrument that can play a tune? You must be mad!

Don’t worry, we thought we were too, but after having this idea in our head for a long time, we finally bought a glockenspiel to try it out-  and lo and behold our Crumble powered glockenspiel is alive.

Surprisingly, you don’t need many parts to make the instrument work. A glockenspiel with a beater, two servos, some cable ties and a sticky pad or two. We placed it on a spare piece of corriflute so that we could keep the servos and the glockenspiel aligned.

We needed two servos for this. One servo with the “cross” attachment, and the other with the “double arm”. These were then wired into the Crumble, one on A and the other on B.

The two servos were then connected with sticky pads and cable ties. The bottom servo moves along the X axis (left to right), and the top servo along the Y axis (up and down).

To allow us to easily play the given notes, we created a variable for each one and worked out, through trial and error, which notes were at which angle.

We then moved onto setting out variables for a crotchet, a minim, and then the angles at which the top servo needs to be to hit the glockenspiel, and where it should rest at.

This is the block of code to hit the ‘F’ key, for one crotchet (same as the beat). The total of the wait statements is 750 milliseconds, which equals 80bpm.

And there you have it, one Crumble-powered Glockenspiel! Our instrument came with some free music, so we decided to use one of those pieces. After piecing together many snippets of code, here is Beethoven’s 9th Symphony – well the first line, in all of its Crumble-y glory.

Christmas has arrived!

Our first proper Christmas since we moved in to our new building with Mindsets. We’ve decided to mark the occasion with a suitably decorated tree!

We connected 20 Sparkles and a Sparkle Baton together using croc-leads. We then wrapped these around the tree, with the Baton on the top. The croc-leads are almost a decoration in themselves!

The Crumble is connected to a Raspberry Pi, which is connected to our network, meaning we can remote-desktop in and change the lights! It’s pretty much an Internet of Things Christmas tree.

We decided to add our big red button near the base of the tree, to allow the user to cycle through the light sequences. The code runs a light sequence, and waits for the button to be pressed before moving onto the next sequence.

We decided that the tree was a bit bland, especially during the day time, so we added a few more decorations to it.

And there we have it, our IoT Christmas tree, ready to be programmed by anyone in the office.

Kicking Off EU Code Week In Style

On Friday 6th October 2017, Joseph and Dan from Redfern/Mindsets and Mike Cargill from UKSTEM ventured into London, to help UCL kick start European Code Week. 

For those of you that don’t know, the European Code Week (EU Code Week) is a grass-roots initiative set up in 2013 by the Young Advisors for Digital Agenda Europe. The Code Week aims to get as many people as possible, from across Europe and the World, to take part in exciting Computer Science activities. It has been growing in success, with nearly 1 million  participants from across 50 countries taking part in 2016. 

The Code Week kickstart event took place at UCL’s BaseKX, Camden – a modern building, designed to provide a space for business start-ups to establish themselves. We were amongst about 15 different companies, including Lego education, Discovery Espresso and Ohbot. 

The morning started with a few guest speakers, discussing topics ranging from the history of coding, to the development of BaseKX. After a break, the various groups of children found their workshops, and the coding began. We had two different workshops running – one table of 10 children were working on line-drawing buggies, while the other table had a range of activities: our new countdown clock; a probability spinner; a reaction timer; and two matrix Sparkle displays. Each workshop ran for 40 minutes, and there were two more after lunch, so, all together, we got to work with around 60 children from 6 different schools. 

We love doing events like these, as they allow us to see the impact and enjoyment that the Crumble can have/cause. Without this, it’s really hard to judge what’s happening on the ‘front line’, unless we are given explicit feedback. It also gives us a great opportunity to see if our new ideas and projects are worthwhile, and whether they pass judgement from your average primary school child. At each of our workshop sessions there was a real sense of excitement and a buzz in the atmosphere. The children were always focused on their task and they were all desperate to reach the end-goal of their challenge.

When children are new to the Crumble they are great at finding bugs. We were trialling our latest Crumble software update and, sure enough, our first group discovered a bug! This is great because it allows us to fix these issues, before the software becomes public. These events also provide a good platform to test new workshop resources – all of our worksheets were new, along with two new products. As with anything new, there were a couple of teething issues, but this event allowed us to refine our workshop material and make it even better.  

Not only do these events provide us with a platform to let schools know about the Crumble, they provide us with a great opportunity to better ourselves – and for that we are thankful.  

The icing on the cake was being voted the favourite workshop by two separate schools. That’s not bad considering we only worked with six schools and had some high-quality competition!

Read more about Code Week 2017 news and events here.