Monday, January 21, 2019

Thermal Pollution Monitoring with Bitty Blue

Thermal pollution is an environmental issue that we don't hear a lot about. It involves the artificially induced, rapid changing of the ambient temperature of the sea, lakes or rivers and it's a serious problem which can have a devastating affect on fish and other organisms as they succumb to thermal shock.

The most common source of thermal pollution is industry. Power plants and factories which dump heated waste water directly into the sea can cause a rapid increase in water temperature and the death of aquatic life.

I didn't know anything about thermal pollution until a few months ago. In fact, I'd never heard of it and I'd like to share with you how it is that I came to learn about the subject, all thanks to two  schoolgirls, Nouf and Mawwadah who live in Saudi Arabia.

Nouf and Mawwadah contacted me by Twitter, asking for some guidance on how to approach a school project involving micro:bit. Their teacher had asked them to think about thermal pollution and how technology might help prevent it and to build a working solution.

The project idea goes like this; imagine the waste water pipes from every factory by the sea were fitted with special devices which could monitor their temperature. If the temperature got too hot or too cold, risking thermal shock, the device could inform a computer system wirelessly, raising the alarm that the factory was breaking the law and causing thermal pollution.

Nouf had seen a YouTube video of one of the Bitty Software smartphone applications, Bitty Blue and knew it had the ability to act as a temperature monitor, with a suitably programmed micro:bit measuring the temperature using its built-in sensor and sending information to the Bitty Blue application. Depending on the information received from the micro:bit, Bitty Blue would display an image and some text indicating whether the micro:bit was telling it that the temperature was OK, too cold or too hot.

Nouf and Mawwadah talked with me using Twitter instant messages and I explained how Bluetooth, one of the most commonly used wireless communication technologies was an important ingredient in the solution. They were quite new to programming and so I did my best to act as a tutor. We talked about the basic logic, the programming concept of an "event", how "events" can be used to trigger Bluetooth communication with the Bitty Blue application and what the transmitted messages would need to contain. With a little guidance and a few more Twitter conversations, Nouf and Mawaddah were able to use MakeCode to create a micro:bit project which did exactly what it needed to. It looped, measuring the temperature every second or so and then sent a Bluetooth message containing a number which meant "OK" (0), "Too Cold" (1) or "Too Hot" (2).

We had covered a lot of information in a short time, and Nouf came up with the idea of sitting down with her sister and explaining the code to her as a way of making sure she understood everything. A great idea and of course in professional programming, walking someone else through your code is something which is commonly done.

So what happened next? Late last year, Nouf made contact again and told me that their school project had been a success. Another friend, Heeba had built a (very impressive) model factory, complete with a pipe which could carry hot water and a pool into which water could flow. With a micro:bit fixed to the pipe, they were able to fully test the idea and demonstrate that their concept worked and worked very well. It sounds like the project was a result of excellent team work, with everyone contributing something important.

Best of all, the team shared a video of her project being demonstrated in class. With permission, I added some captions and published it on YouTube.

If I was a teacher at this school I would award an A+ for this project without hesitation! It's brilliant. I have to say I'd also award Nouf and Mawaddah an A+ for showing such initiative and determination in tracking me down and asking questions in the way that she did.  :-)

Here's the video of the team's project.

p.s. BittyWeb, the web-based micro:bit project system from Bitty Software contains an application called Bitty Event Monitor. It's like the Bitty Blue temperature monitor application except that you can use it to monitor *anything* your micro:bit can measure with or without additional components like sensors attached to it. CO2, humidity, atmospheric pressure, vibration... you name it, you can build a fantastic school project with it.

Information about Bitty Blue can be found here: and code microbit here

Sunday, January 13, 2019

Roger Wagner's MakerBit and Robo:Bunny

Roger Wagner's MakerBit is an impressive board for micro:bit projects with tons of very well thought through connectivity options, all of which are plug and play, leaving my soldering iron looking sad and neglected on its shelf!

You can buy MakerBit in several forms. As a standalone product, there are two variants. I used the MakerBit R which has additional features for robotics projects compared to the standard MakerBit. You can also get MakerBit in various kits with a wealth of additional components included for you to use in your maker projects.

You can of course invent your own projects, but MakerBit comes with several activity ideas to get you started. They're really well documented and I opted to follow the one for making a "smart car".

Interestingly, there's no chassis provided for the smart car project. Instead, you're encouraged to improvise and reuse a handy cardboard box, perhaps the one your MakerBit came in! I really like this idea. Anything which encourages kids to consider reuse and recycling is good in my book.

I built a "robot bunny" with interchangeable stick on face and programmed the micro:bit so I could control it from either the D-Pad UI or the touchpad UI of Bitty Controller.

My micro:bit code is available for you to use or adapt for your own Bitty Controller projects, as you see fit. See and

MakerBit is highly recommended. I expect I'll be using it for other projects in the future, not just bunny related ones!

Here's a video to close this post with. Enjoy!

Tuesday, January 1, 2019

Bitty Controller 2.2.0

A new version of Bitty Controller was released today. A great start to 2019!

The new version offers a 5th user interface variant which is designed to let you drive a machine of some sort *and* control ancillary features of the machine like LEDs and servos. From the options screen you can enable up to 12 buttons and give each a short text label. These buttons will then appear either side of the main touchpad control.

Pressing a button sends a Bluetooth event with ID=9016 and a value equal to the button number in the range 1 - 12 inclusive.

I transformed a GiggleBot into my very own robot dog and used the new UI to take it for a spin. At times... literally. As you'll see, it's very evident from the enthusiastically wagging tail that robodog is a happy dog :-)

Full source code for a MakeCode project is available from the Bitty Software web site as well as a ready made hex file.

Go on! Have a giggle with Bitty Controller and GiggleBot!