Archive | Product Focus

I have the NEW Starter Kit – What Next?

The eagle-eyed amongst you, along with any one who saw us at Bett, or anyone that has ordered one already, will have noticed that the Starter Kit has changed!

Our New Starter Kit

It’s a long-discussed decision, and we finally felt that now was the right time to do it. Since its inception, the Starter Kit has undergone a few changes, including swapping out a normal battery box, for our short-protected one, and more recently, switching the plain white box for a fancy printed version, all whilst keeping the price the same!

The Starter Kit remains a very popular way for schools to get their hands on Crumble kit, with many opting to buy 15/16 for a class of 30 pupils. Although there are a good number of projects you can do with it, we decided that we wanted even more.

We thought long and hard, and we’ve now added in a buzzer and a light sensor, which transforms the number of projects you can do with just the starter kit!

Without further ado, let’s get stuck into some project ideas!

First of all, if you haven’t already looked at it, make sure to check out our original post. All of the projects still apply, but they don’t make use of the buzzer or the light sensor.

Morse Code

For a start, let’s look at morse code. We covered this in our original post, however morse code is traditionally audible – therefore it makes sense to put the buzzer to use!

The buzzer can be wired/controlled in a few different ways. You can either connect the positive side to an output (A, B, C or D) and the other end to negative (-) on the Crumble or the battery back, or you can connect the + and – to the corresponding connections on a motor output. We’re opting for the former.

To demonstrate it, we’ve opted to make the letter C. To sound the buzzer, set the output it is connected to, to HI. To stop the buzzer sounding, set it to LO.

Nightlight

Next up, we have a simple night light. The idea behind this is to create a light, using the Sparkle, which turns on when it gets dark. Connecting the light sensor is easy. Connect the + on the light sensor to a + output from either the Crumble or the battery pack. Then connect the negative (-) on the sensor to an I/O (A, B, C or D).

To incorporate this into a program is simple. We can either take and use the analogue reading from the connected I/O pad, or check whether the pin is HI or LO. We have used the latter for simplicity (this wouldn’t be easy with the old LDR). If A is HI, it is therefore light so we want to turn the Sparkle off, otherwise A must be LO, and it is dark so we want to turn the Sparkle orange.

If you want more detail, head to our nightlight project page.

Lighthouse

Extending the idea of a nightlight brings us neatly onto a lighthouse. By using the same components, we can achieve a different outcome.

We’ve chosen to write the code slightly differently, to show how there are multiple ways of achieving the same outcome. This time our condition checks whether or not A is LO (it is dark). If it is, flash the Sparkle. Otherwise, turn the Sparkle off.

If you want more detail, head to our Lighthouse project page.

Drink Alarm

Our final idea combines the principles of the previous projects together, as well as the buzzer and light sensor. The idea behind this is that you have an object e.g. a drink on top of the light sensor. When the item is removed, the buzzer sounds. You could even add a flashing light if you wanted too!

Once again we’ve chosen a ‘different’ way of programming this. You could easily use the ‘IF__ELSE’ condition from the previous examples. This time we are putting a ‘pause’ on our program which waits until A is HI (the drink is removed and it gets light). After this condition is met, the program continues and beeps the buzzer. We then loop back to the beginning. If A is still HI then we keep hearing the buzzer beep.

These are just a few more examples of projects you can do with the Starter Kit, and we are sure that you will think of many more!

If you have a go at this project, or any other, we’d love to see! Get in contact with us via emailFacebookTwitter or our Forum, and we may feature your work!

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. Before you get started with the projects, you may want to check out our basics video, which walks you from the very beginning.

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!

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.