What Is IOT (Internet of Things)?
We’re getting really, really good at making small computers. While phones are an obvious example of this (your phone is much more powerful than a full sized computer from even twenty years ago), there are a lot of other places where we’ve started to stick small computers. All of these web-connected devices form something we call the IOT or “Internet of Things.”
What Is Light Blue Bean?
Light Blue Bean is a microcontroller that’s designed to be simple, cheap, and powerful. It’s a small processor that’s hooked up to a light, an accelerometer, a thermometer, and a few other bits of tech. Most importantly, however, it’s got built-in wireless. This enables you and your students to write custom code that can run on the Light Blue Bean. You can connect it to tablets, phones, and other devices in order to create connected systems. You can use it as a temperature sensor, have it control a lock, use the accelerometer as a game controller, or even program it to count the number of steps you take while you’re wearing it. The possibilities are endless.
Do Other Devices Like This Exist?
Light Blue Bean isn’t the only device of its kind. It’s an Arduino compatible device, which means it complies with certain standards when it comes to input, output, and programming. It competes with other Arduino compatible devices made by lots of other companies. Another popular mini-computer is the Raspberry Pi, which comes in a variety of configurations and price points. Like Light Blue Bean, these devices are popular among educators who teach students how to code.
Why Teach Students To Code?
One of the hottest terms among educators these days is “computational thinking.” It’s a concept that describes breaking down complex challenges into small tasks or pseudocode. Computational thinking is a valuable skill in any field, not just computer science. Being able to break down problems into more manageable chunks is absolutely vital to success in life. Since computational thinking provides a way for students to deconstruct problems in an organized and structured way, it’s often used to great effect for solving all sorts of challenges. Teaching students to code is an effective way of teaching them basic computational thinking techniques.
How Can I Use Light Blue Bean In The Classroom?
This step by step example illustrates how easy it is to make a basic program using the Light Blue Bean and the Tickle app. By changing just a few parameters, you and your students can make a wide variety of custom programs. For this example, we’ll make a controller for a boxing game.
1. Open the Tickle App on the device you’re going to use for programming
2. Make a new project using the Arduino Bean template
3. There’s a bit of example code in the window when you start. In order to clear it, grab the blocks of code and drag them to the area on the left of your screen. They’ll disappear!
4. In order to have a bit of fun, let’s add a character to our program! Go to the top right-hand corner to open the Devices & Characters dialogue. Let’s add a penguin for now. Penguins are very good boxers.
5. A “When Starting To Play” block should have popped up on your screen. You can add code here that will execute when your program starts to run!
6. Let’s add some control structures to our code. Add an “If / Then / Else” block from the code blocks on the left. It’ll be with the other orange control statements. Drag it under the “When Starting to Play” block in order to have this if statement executed when our program starts.
7. In the green section on the left, you’ll find a bunch of operator expressions. Find one that compares numbers (less than or greater than) and drag it into the grayish box in your if statement. Now, your if statement will fire when the expression in the green box is true!
8. You can type numbers into the boxes in your comparison operator in order to set the values. Let’s set the lower end (the number the pointy end of the < or > is pointing towards) to about 1.9. You can play with this value in order to change the way your game feels.
9. Under the blue-green devices code blocks on the left, find the “Accelerometer” block and drag it into the other end of your comparison operator (the side the Pac-man wants to eat). Change the drop downs so it uses the x-axis of your Arduino Bean.
10. Let’s make our if statement do some things! Under the first yellow block, drag in a pink sound and a purple “set looks” block. You can make these whatever you’d like. I’m going to set the look of my character to “shocked penguin.” These statements will be triggered when the if statement is called and the accelerometer is currently experiencing a high amount of acceleration, as set by the above green statement.
11. Now let’s add some code to the “else” block of our if statement. Drag a purple “say” expression below the yellow block that says “else” and put in some text to let players of your game know that they need to punch harder. Try something encouraging like “keep trying” or “good work!”
12. We’ve got the basic logic for our game all done! Add some control statements (like a loop) in order to call this code repeatedly. A few well-placed delays will keep your code from spamming your user. If you want to get really advanced, you might want to even use a variable to keep track of the highest acceleration the unit has experienced in the last second or so instead of checking the accelerometer in real time. Be sure to clear that variable after each success, however!
Check Out My Video Presentation Below