If you didn’t know already, we have a range of new and exciting components to use with the Crumble: Smart Crumbs. If you don’t know anything about these yet, you can find out more here. In this post, we are going to focus on the Temperature Smart Crumb, which, probably pretty obviously, enables us to measure and utilise within our Crumble programs the temperature in °C.
Smart Crumb: Temperature£3.80 (£4.56 inc. VAT)
Each Smart Crumb is simple to use and after reading this post, you should easily have the basics nailed! Let’s start with connecting it to the Crumble.
A Smart Crumb needs a connection to power (+ and -) as well as one to an I/O port (A, B, C or D). We’ll connect ours to D, simply because that way we get a more aesthetically pleasing diagram! You’ll also need to wire up a battery pack to your Crumble too.
Now we can look at how to find the temperature and use this within a program.
First of all, locate the ‘Smart’ blocks section in the Crumble software. Here you will find all of the relevant blocks needed to control and use Smart Crumbs.
Now let’s run a simple program so that we can see the data we’re getting out of our temperature sensor. With any luck, when you flick to the ‘Variables’ tab you should be able to see the temperature.
Try grasping the Smart Crumb in your hand; the temperature should rise. Then when you let go again, it should fall. Although you can use the ‘temperature on x in °C ‘ block as a variable/integer, it is good practice to create and use a separate variable within your program e.g. we’ve used ‘t’. This is so that we can monitor what happens with the value and debug more easily (e.g. if there is data shown, we’ve wired it up correctly).
From here, we can easily embed our temperature sensor into any project we wish! Thermostat-controlled fan? Coolbox alarm? Investigation into which materials make good thermal conductors/insulators? These are just a few ideas to get you started!
We hope that this has covered the basics of how to use the Temperature Smart Crumb, but if you do have any queries or questions, or you spot something that isn’t quite right feel free to get in touch! Get in contact with us via email, Facebook, X or our Forum and we may feature your work!