Archive | Crumble Projects

Scanner Bot – The Inside Scoop

For those of you that ventured along to Bett this year, you may have spotted a small spinning robot on our stand, which we christened ‘The Scanner Bot’.

You may have even seen posts about it on Twitter. The project drew a lot of attention, and eventually it got us thinking – we need to turn this into a project on the website.

The idea for the project actually stemmed from last year’s Bett, where Helen, one of the Directors here at Redfern, wanted to highlight that fact that motors can be used in different ways. So whilst we were there, she created this :

As you can also see, Helen had been inspired by the video of a students’ work, posted by Phil Wickins.

Given that the inspiration for our new Scanner Bot had been ‘magpied’, we wanted to give credit where credit is due. So we contacted Phil to tell him about our project idea, and whether he was ok with us referring to it.

When he came back to us, he had gone above and beyond in providing loads of information about the project, including the original design work, which is awesome!

Meet the ‘Burglar Alarm Bot’ – the true inspiration behind our Scanner Bot project.

The Burglar Alarm Bot was made by William Bradley, a Year 6 pupil from Bitterne Manor Primary School, Southampton. We absolutely love this project, and as you can see, it looks great and it works really well!

In his blog about the teaching that went around this project, Phil outlines his creative approach to teaching physical computing. Instead of having a set project in mind, he teaches the children how to use the individual components, and then lets them use their imagination to come up with a project. We really like this approach to physical computing, as it enables children to work within their means, and push themselves to their own limits. The phrase “low floor, high ceiling and wide walls” comes to mind here.

One of the most important steps within this process, is the planning stage. As you can see from William’s design, he was confident in how he wanted his project to look.

The careful thought and consideration that went into the planning stage, and the prior learning (components) meant that William knew how the ‘insides’ would fit together, and this lead to a brilliant project.

Although we’ve focussed primarily on the Burglar Alarm Bot, if you head over to Phil’s blog, you will see many more great designs by the other pupils in his class.

If you want to have a go at making your own Scanner Bot, head over to our project page.

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 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!

Jazz up your Christmas Tree

Christmas is fast approaching, and to spruce up the office we decided to get a tree. However, this tree is a little bit different. Are they massive flexible Sparkles or is the tree really small?

Sadly, it is the latter. We picked up the tiniest little Christmas tree, and decided it needed a bit of a Crumble makeover. 

We snipped 10 lights off of our Flexible Sparkle Strip and soldered them together. If you don’t feel confident enough doing this, you could use the whole flexible strip and wrap that around your tree, or if you want to use big Sparkles, you can croc-clip them together like we did a couple of years ago.

After decorating, you can then program your own custom light sequences! We decided that we wanted a fairly classic light sequence, lighting up random colours between red, orange, yellow, green and blue. To achieve this, we are taking inspiration from our ‘Random Colour Picker’ blog

The program is simpler than it looks. Assign a variable a number, which will define what colour our Sparkle will light up. Then set a random Sparkle between 0 and 9, to the chosen colour. Wait 10ms before doing it all again!

This is not only way way of running your lights – you could have them fading through RGB, pulsing on and off, chasing up and down the tree, or you could even make your tree interactive!

Our lovely bit of festive cheer, to brighten up the office.

Thank you all for making this our best year yet. We have many exciting things planned for next year, and we are excited to share them with you soon. We hope you all have a wonderful Christmas, and a Happy New Year! See you in 2020.

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!

DIY Switches 2:

One blog post was definitely not enough to look at DIY switches. Given how simple the idea is, it’s surprising just how many different ways you can make a switch! If you haven’t already seen it, take a look at our first post.

We love these, as they provide an alternative way of using interesting inputs with the Crumble. We’ve decided to show you a few more examples of switches you can make yourself, and whilst going through this process we’ve thought of a brilliant idea for a new project, which we are working on now.

The first switch we have here, is a moisture sensor. It is made using two strips of copper tape (you could use anything conductive) placed close together.

If you wet your finger and place it across the two strips, the moisture bridges the two pads, causing the switch to be ‘closed’.

Next up, we have a reed style switch. For those of you unfamiliar with a reed switch, take a look at our Magic Candle blog to see it in action. Put simply, it’s a switch that is triggered (closed) by a magnet. We have fashioned our own using some aluminium foil (not magnetic), and a nut glued to the raised flap of foil.

When a magnet goes near the underside of the switch, the nut is pulled towards the other piece of foil, closing the connection. When the magnet is moved away again, the foil flaps open again. It’s amazing how resilient and springy foil can be!

Now we move onto something a little bit different. We’re going to call this a ‘joust switch’. It serves the same purpose as a whisker/bump/micro switch.

When it is pressed, the connection is broken (push-to-break). We can use this as a limit switch, and easily make a bump-and-reverse buggy!

Our final switch takes inspiration from a tilt switch. We have left the top off of this version, to make it easier to see what is going on.

When tilted in a certain direction, the ball bearing touches our two electrodes, closing the switch. When it’s tilted back, the ball bearing moves away from the electrodes and breaks the connection, opening the switch.

And there you have it, more switches to use with your projects!

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!

DIY Switches

Although the outputs (motors, Sparkles, buzzers etc) of the Crumble get a lot of love and attention, we mustn’t forget how awesome inputs are! They allow us to interact with our projects. Arguably the simplest type of input, the humble switch provides us with a digital(binary) input for the Crumble; it is either on/off or HI/LO.

Before we look at making our own switch, we need to consider what a switch is, and what it does. This will help us later on. If you already have a good understanding, then feel free to skip over the next bit.

First, let us consider a circuit – a closed loop of conductive material and electronic components through which electricity flows. The important word here is ‘closed’. Electricity will only flow when there is a clear path from positive (+ve) to negative (-ve). If we break the circuit/connection, then the electricity will stop flowing. This can be very useful when we want to control components in a circuit e.g. a buzzer or a light. We can do this by using a switch – a component which we use to control the flow of electricity.

There are all manner of switches available, from a good ol’ push switch to an illuminated key switch. But sometimes there just isn’t quite the one we want, or one we can integrate into a project how we want. A great way of solving a particular problem and thinking about how switches work is to make your own. To make something, which when interacted with in some way, will close a circuit. Not only does this give you a great insight as to how switches work, the concepts involved are perfect for meeting various Computing/Science/Design & Technology curriculum targets.

So without further ado, let us look at different ways to make switches!

First of all, let’s make a classic split pin/paperclip switch.

By moving the paperclip, we can open/close the switch. The paperclip joins together our two contacts (split pins), which are connected to the Crumble – one on a +ve output, and the other to an input (A, B or C – D is used for a Sparkle). When the connection is made, A becomes HI and the Crumble turns a Sparkle on red. When the connection is broken, the Sparkle turns off.

Our code for this is as follows. Although not the most efficient way of achieving our desired result, this code is easily extendable for our rotary switch. If A is HI, then set the Sparkle red, otherwise turn the sparkle off.

Continuing along the theme of a simple switch, lets make a ‘pressure pad’ style switch.

When pressure is applied to the top surface, the foil bridges the gap between the two foil contacts on the bottom surface (connected to the Crumble as before). This then runs the same program as before – the switch is a straight swap.

Finally, we decided that we wanted a rotary switch, with multiple outputs.

The centre arrow can be lined up with one of three outputs. Each one connects to a separate input on the Crumble. Depending on which one of the inputs is HI, the Crumble lights the Sparkle red, green or blue.

The code for this is an extension of our previous two switches, except that we check for multiple different conditions being true (inputs being HI).

These are just a few different ways of making your own switch. By taking the very basic principle of ‘bridging a gap’ and closing a circuit, you can easily let your creativity run.

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!

NCW Day 5 – Game Time!

Welcome to our fifth and final blogpost from our National Coding Week special. If you’ve missed any of the other four, or want to find our more about what we’re doing, and why we’re doing it, then head over here to find out more.

This final post, as mentioned previously, is all about playing a game. We are going to combine together each of our previous elements, and turn them into something playable! To recap, we’ve got the Colour Picker, the Dice, the Letter Spinner and the Countdown Timer.

Before we get into the fundamentals of the game, we are going to combine together each of our individual elements, so that at the push of a button, our game runs! If you remember, each of our projects shared the fact that they were started at the push of a button, or when the I/O pad was HI. By tweaking each project to turn an I/O pad, connected to another Crumble, to HI at the right moment, we can cause a chain reaction! To get a better sense of what is going on programmatically, lets look at our new Colour Picker code.

Notice the addition at the end of the code. We’ve set C HI, which is connected to A on the next Crumble (running the Dice program). We then wait 100ms and set it LO again.

We’ve changed each program (apart from the Countdown Timer) so that it runs the additional code snippet after it’s finished it’s main purpose. We have changed the Countdown timer code so that it doesn’t wait for another input to reset the servo, rather it resets itself after a few seconds.

To get this to work correctly, we need to have common grounds (-ve). The easiest way to do this, like we have, is to use a single power supply.

This is only one of the ways to connect your projects up.

Lets look at the chain reaction in action!

Now we come to the game, which is played as follows. The aim is to come up with as many words as you can, which are as long as the number on the dice, within the time limit (one and two may be tricky, so you could remove them). The colour at the beginning relates to a bit of a forfeit which takes place during the round. These are as follows:

  • Red – Scattergories mode. If any of your words are the same as anyone else’s, they don’t count for anyone! You need to be unique to win.
  • Green – Hand switch. Swap your usual writing hand, for your non-dominant one.
  • Blue – Shout it out. Every time you write down a word, you have to shout it out.
  • Yellow – Normal. No bizarre rules, just write down as many words as you can.

Let’s look at an example.

Here we’ve ended up with green, five and G. This means that we need to write as many five letter words as we can, that start with the letter G, in 30s. But we have to do it with our non-dominant hand, so in my case I would swap to my left hand to write with.

And there we have our game ready to play! Clearly you aren’t limited to this version of the game. There’s a plethora of possibilities out there using these examples or combinations of your own.

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.

NCW Day 4 – Countdown Timer

Welcome to our fourth blog post, in a series of five, in celebration of National Coding Week. If you haven’t already, take a look here to find out more about what we’re doing, and why we’re doing it.

The next part of our game is going to be a countdown timer. The aim of this project is fairly self explanatory. Our game requires a time limit, so what better way to keep us within the time limit than with a timer not dissimilar to the one from Countdown!

For this you will need:

For the eagle-eyed amongst you, you may realise that we have already done a Countdown Clock Project. This is going to be an updated version of it, but we will go into less depth with the programming. If you are unsure of why we did something, go and check out the original post for help.

To begin with, we are going to connect together the components. Connect the +ve and -ve on the battery box to the respective connections on the Crumble (left hand side). Make sure to keep the batteries switched off for the moment.

Now we are going to connect our servo. This requires a +ve and -ve connection, which we can take from the right hand side of the Crumble, and then one I/O pad; we’ll use D, to keep the wiring neat!

To get the basic servo-powered timer working, we need to think about what we are trying to achieve. Let’s say that that we want the timer to last for 30 seconds. During this time, the servo needs to travel 180 degrees, from the top of the clock face, to the bottom. Therefore our servo needs to travel 180/30 degrees (=6) every second. We can achieve this using a variable and a loop. We set our servo to 90, then every second, we subtract 6 from the servo angle and re-set it.

To make this switch controlled, we can use a similar method to our previous NCW projects. Within a loop, we wait until A is HI before starting our timer code. We then have another ‘wait until A is HI’ after our main timer code, which works in such a way so that the servo resets and waits to be started again. You’ll notice the extra wait statement – this allows the servo to ‘reset’ before you press the button to start it again.

Given that it is unlikely that the players will be looking at the clock, we can also add in a buzzer to give us an audible cue as to how much time has passed. This will also help ramp up the pressure, making the game more exciting! We’ve connected the buzzer to B, and to the negative pad on the battery box. This means that when we set B HI, the buzzer will sound.

To use this within our program, we need to turn on the buzzer, and turn it off again in between setting the servo angle (our original timer code). The total amount of time we need to be waiting, still needs to be equal to 1 second (buzzer on for 0.2 seconds, and off for 0.8). Notice where we have turned the buzzer on towards the end. This sounds the buzzer continuously until the clock is reset. This is useful to know when the time is up!

We now have a working 30s timer! Although the servo isn’t very useful at the moment, so we are going to embed it with our Countdown Clock Template. For instructions on putting this together, head back to our original project page.

And there you have it, a 30s Countdown timer!

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.

NCW Day 3 – Letter Spinner

Welcome to our third blog post, in a series of five, in celebration of National Coding Week. If you haven’t already, take a look here to find out more about what we’re doing, and why we’re doing it.

The next part of our game is going to be a letter spinner. The aim of this project is to randomly choose a letter of the alphabet, spread around, by way of a large spinning arrow. We will borrow from the foundations of our Probability Spinner Project and tweak it.

For this you will need:

For starters, we are going to connect together the components. Connect the +ve and -ve on the battery box to the respective connections on the Crumble (left hand side). Make sure to keep the batteries switched off for the moment.

Now we are going to connect a motor, with the pulley attached. You can use either motor connection on the Crumble, but we’re using motor 2. Connect the red lead of the motor, to the + on the motor pad, and the black to the – .

Getting our motor to move is simple, as is getting it to stop, but we want to make it spin for a random amount of time. To do this, we can use the ‘random _ to _’ block; a common occurrence throughout this blog series. When the Crumble receives power, we will give ourselves 2 seconds to move our hand away, then we will turn the motor forwards. We will wait a number of milliseconds, between 3000 and 9000, and then stop the motor.

To make the spinner easier to use, we can use a push switch to trigger the spinner. This connects to a + connection, and an I/O pad (A, B, C or D).

As with our previous posts we are going to ‘pause’ the program and wait until the input (D) is HI’. Once the switch is pressed, the program continues and our spinner code will run. All of this will then be inside a loop, to allow for infinite letter choosing! Or until the batteries run out, or we get bored.

Although this spinner is perfectly adequate, to make it more realistic, we want it to slow down gradually. We are going to add a variable called ‘Speed’, which will start at 100 (%). When the spinner is due to stop, we will run a loop which subtracts varying amounts from ‘Speed’, bringing the motor to a gradual-ish stop.

Hint: we use the condition ‘if speed < 1’ as the speed value may not equal 0. If we didn’t, the value could become negative and the motor would begin speeding up in the other direction!

And there we have a our letter spinner ready to rock!

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.

NCW Day 2 – Dice

Welcome to our second blog post, in a series of five, in celebration of National Coding Week. If you haven’t already, take a look here to find out more about what we’re doing, and why we’re doing it.

The next aspect of our game involves a random number selection, and in our case, digital dice. There are a few ways you could go about this, but we are going to use the Matrix display to represent the dots, as it is already in a nice grid.

For this you will need:

First of all, we are going to connect together the components. Connect the +ve and -ve on the battery box to the respective connections on the Crumble (left hand side). Make sure to keep the batteries switched off for the moment.

Next, we need to connect the Matrix Display. Connect the remaining +ve and -ve on the Crumble to the corresponding connections on the Matrix board. Looking at the Matrix board with the text the correct way up, it’s the pads on the left-hand side. Then connect D from the Crumble to the board – notice the direction of the D arrow, it should point away from the Crumble. If you are using the Matrix Pixelator, you may need to look carefully at which way around your board is in the holder.

Before we come to write our code, we need to work out what our numbers (or spots) will look like. It can be a good idea to plan this to save confusion later on.

Now we come to writing our code. This program is similar to the colour picker from yesterday, but instead of assigning a single colour to a value, we are going to assign an ‘image’; or multiple Sparkles. Lets start, as before, with two choices. We’ll look at choosing either 1 or 2. First of all, lets get our variable set up.

Now we can add a condition in. Remember that we can use the ‘IF ELSE’ statement as our options are mutually exclusive; our ‘RandomNumber’ cannot be one and two at the same time! If the generated number is one, then we want the Matrix display to show one, otherwise the generated number must be two and so we want to display two on the Matrix. We’ve also turned off all of the Sparkles at the beginning, which makes sure that our Matrix is ‘reset’, and we’ve got a wait statement, which gives us time to move our hand away from switching on the power.

Now we want to extend our code, as before, to have as many options as we require (6), and so that we can choose our number at the push of a button. Wiring in a switch is simple. One side connects to a free +ve connection, and the other to an I/O pad on the Crumble – we’ll go for A.

Using the switch within our program is easy. Put your code within a ‘do forever’ loop, so that it runs indefinitely whilst the Crumble is powered, and then we can use a ‘wait until’ block. This behaves like a pause in our program, so that it won’t move on until the condition is met, which in our case is when the button is pressed and A is HI. The wait statement from earlier comes in useful here too, as does clearing the Sparkles.

And there we have our digital die, ready to roll (excuse the pun)!

If you have a go at this project, or any other, we’d love to see! Get in contact with us via email, FacebookTwitter or our Forum.

NCW Day 1 – Colour Picker

Welcome to our first blog post, in a series of five, in celebration of National Coding Week. If you haven’t already, take a look here to find out more about what we’re doing, and why we’re doing it.

The first aspect of our game is going to be a colour picker. The aim of this project is to set a Sparkle to a random, but predetermined colour. Or in other words, choose from a set choice of colours (that we have programmed). This could then go on to be used to pick an option from a list or a team to take part etc.

For this you will need:

First up, we are going to connect together the components. Connect the +ve and -ve on the battery box to the respective connections on the Crumble (left hand side). Make sure to keep the batteries switched off for the moment.

Next, connect your Sparkle. Connect the remaining +ve and -ve on the Crumble to the ‘in’ on the Sparkle (the D arrow should be pointing to the right). Then connect D from the Crumble to the Sparkle, taking care to get the direction correct, as previously mentioned. Use the diagram below if you’re unsure.

Now we come to writing our code. To begin with, we are going to randomly choose between two colours. To do this, we want to think about assigning each of our colours a number – starting from zero e.g. Red = 0, Green = 1.

At the the beginning of our program, we want to choose a random number within the range of our list. So either 0 or 1. Once we have chosen the number and ‘remembered’ it (by assigning it to a variable), we can work out what colour to set the Sparkle.

This is achieved by a series of selection (or ‘IF’) statements – basically questions. In English, it would be ‘If the random number is 0, then make my Sparkle red’. Notice the wait statement – this just allows us time to get our hand away from the switch, but it also gives the illusion that the Crumble is ‘thinking’. Also notice where we turn the Sparkle off at the beginning. Whilst the Sparkle has power, it remembers the colour it was last told to be. Although at the moment we are using the battery pack to switch on and off, we will need this in the future, so it’s good to put it in now.

We could repeat this for the other colour, changing the numerical value and the colour of the Sparkle, and this works just how we want it to.

However, there is a bit of redundancy within our code. As our two conditions (if RandomNumber = 0, and if RandomNumber = 1) are mutually exclusive (they can’t both be true), we don’t need to check the second condition. If the ‘RandomNumber’ doesn’t equal 0, then it has to equal 1 (as long as the random number generation is correct). Therefore, the best way of writing this code is as follows.

From this point on, it should be easy to see how you would extend this code to choose between even more colours! See if you can choose between 4 different colours?

We have a working colour picker, but at the moment it only works once. So, instead of triggering our program by powering the Crumble on, we can add a push switch instead. This way, we can repeatedly generate our colour! If we connect up our switch to A (and a +ve connection), it’s really simple to add in the code to start our colour picker.

We have used the ‘wait until’ block, which halts the program until A is HI (the button is pressed). Our wait statement now also gives us time to remove our finger from the switch. If it wasn’t there, we could repeatedly choose a random colour, and it would be impossible to use. We’ve also put our code inside a ‘do forever’ loop. This runs the code indefinitely, whilst the power is on. Turning off the Sparkle is now really useful! Not only can we see the new colour when the Sparkle lights up, there is no confusion if the colour picked is the same as last time.

And there we have our colour picker!

If you have a go at this project, or any other, we’d love to see! Get in contact with us via email, FacebookTwitter or our Forum.