Monday, 18 August 2014

Home Schooling ICT part 7: The Pi and the cardboard TARDIS

Summer holidays are here, and this year’s project is the most ambitious so far: to build a TARDIS! blog.mindrocketnow.com

Summer holidays are here, and with it the Family Project. We have a large cardboard box (big enough to fit a small DD) that has stayed with us over the last 6 years (and one house move). Each summer the box has turned into a cafĂ©, pirate galleon, robot, rocket and castle. All that’s needed is some paint, some string, and a lot of imagination.

This year, we’ve decided to go one better and combine the box with the Raspberry Pi, to create a TARDIS. The plan is to paint the box Doctor Who blue, and install it in the doorway to the playroom, so that it’s bigger on the inside than the outside. We’ll use the Pi to control the flashing blue light, and the wheezing whooshing noise. DD1 has decided that the flashing and the whooshing should be synchronised, to add to the challenge!

We started off with a bit of planning, just enough to fix the idea in our heads, to have a common vision of what we wanted to achieve. DD2 drew a picture of the final TARDIS, with arrows pointing out which bit did what. DD1 drafted a swim lane diagram that described the cause-effect of what we wanted the computer program to do. I wrote a shopping list of the stuff we needed to buy.

DD2's choice of pink on pink makes the plan hard to read



TARDIS Project Plan
a) Planning
* Draw picture of what we want to build (done)
* Draw cause-effect diagram of how we want the program to work (done)
* Create a shopping list for the stuff (done)

b) The TARDIS box
* Paint the box blue (done)
* Install in doorway (done)
* Paint the “Police Public Call Box” sign
* Paint and attach box telephone handset
* Find a light lantern, and attach lens, for LED light

c) Programming the Raspberry Pi
* Learn how to make an LED flash (done)
* Learn how to play a sound file
* Learn how to play a sound file through an external speaker
* Write a program that flashes an LED and makes a whooshing sound, in sync

d) Connecting the Pi to the TARDIS
* Buy the components and check that they connect together (a bit done)
* Build any bespoke connectors
* Prototype the light and sound rig on breadboard
* Build final rig, and test that it all works

It’s required a bit of investment, mainly of blue poster paint and also components from Maplin. The total spent on bits is around £59 so far. To make the light, we got an IO buffer to protect the IO port, the blue light and the lamp unit (with lens). To make the sound, we got an amp and speaker kit, and I’ve somehow acquired the sound file already.

This was the shopping list:
* 2 bottles of blue poster paint
* Duct tape (to attach the cardboard in a door configuration)
* Raspberry Pi GPIO buffer board
* Ribbon cable to connect Pi GPIO to breadboard
* Breadboard
* Assorted LEDs
* Assorted resistors
* Key switch and mini push-button switch
* Amp and speaker kit
* 3.5mm jack plug
* 10m of red and black bell wire
* Electronics circuits textbook from the library

We already had:
* Door-sized cardboard box
* Raspberry Pi
* “Adventures in Raspberry Pi” by Carrie-Ann Philbin
* Soldering iron and solder
* Multi-meter
* Needle-nose pliers
* Blu-tack and “helping hands” (to act as the additional limbs when soldering)
* Masking tape (to tape over the duct tape on the box, so that the tape can be painted blue)
* Lantern
* Lens
* Assorted jump cables of various lengths (for prototyping on the breadboard)

The painting was straightforward, if time consuming, because we needed to do both sides with two coats. The next step is to paint on the “Police Public Call Box” sign. DD2 had a great idea: to stick the letting onto a white background using collage.

We got the right shade of blue. Next: the lettering.


The computer programming is a challenging for the DDs to understand. There are lot of concepts to get across, concepts that they will not have come across before. For example, they’ve not had to deal with variables, with code libraries, with user access privileges. But the hardest part is the precision required; code must be exactly correct, otherwise it won’t work.

The approach I’ve taken is to try to explain why we have to do things, but the DDs seem to be satisfied with just knowing how to do them. They seem to be able to memorise all the rules, but show less interest in meaning, preferring to focus on outcomes. I wonder if that’s how they absorb their classes at school?

We started with making an LED flash by controlling a GPIO pin. The code is less than 10 lines of python, but the process took over an hour. Perhaps some of that time was because I was trying to involve both DDs at the same time, rather than individually. DD1 typed in the code, and DD2 plugged the components into the breadboard.

Of course, even though the program was copied from the book, it didn’t work first time. Nor even the second. So DD1 and I learnt how to debug code – compare carefully with what’s written down and be exact with how it’s typed in. The error messages are still hard for DD1 to understand, but I’ll continue to explain them. The program did work the third time, and you could hear us whooping with success around the house!

Things learnt so far:
* Poster paint washes off anything, as long as you get to it quickly enough.
* It’s good to write down plans. They needn’t be detailed, but just enough to fix the ideas and vision in your head.
* Nothing works first time, not the building, not the electronics nor the programming. So don’t be discouraged; learn to either fix or work around as you go along.
* There’s a lot to learn, and attention spans are short. Split the work into small (15min) chunks, punctuated by tea for the grown-ups and ice cream for the DDs.
* Always finish when a chunk is complete. Don’t try to do just one more thing, especially if bedtime is looming. Similarly, don’t leave the program half-written to return to the next day.

* Celebrate the achievement of each task in the plan, not just the creation of the final object.



More in this series: part 6, part 8.

Monday, 11 August 2014

Unboxing broadband, part 4: Chromecast and the dumb broadband pipe

My latest toy is Chromecast. It gives me access to great new content, for the price of picture quality. I love it! blog.mindrocketnow.com

My latest TV toy is Chromecast. It’s the price of the bundle that convinced me to buy: £16 for a Chromecast with free season 1 of The Blacklist. Alternatively, £16 for season 1 of The Blacklist with a free Chromecast. Either way the proposition was too good to pass up.

We also have BT Broadband, so I can also watch BT Sport on the TV in HD. That’s one premiership game per week (if the family will leave me alone long enough to enjoy it) for free. Which is about as much as DW is willing to pay.

The way Chromecast works is different to our other set top boxes (Apple TV, Now TV, DTT). Google doesn’t attempt to curate content, it just provides the means to put content onto your TV. You need a Chromecast-compatible app (for example the Chrome browser from my MacBook, or the BT Sport app on my iPhone). You may need to pay the app provider for the content, or it may be free (such as from YouTube). Once selected (and paid for), you can then “Cast” the content to your TV.

Casting (a new web 3.0 verb to get used to) is different from the streaming that Apple allows to its Apple TV. When Casting, the content is streamed directly from the web to the Chromecast box. This means the quality can be better (the smartphone isn’t an unnecessary intermediary congesting the Wi-Fi) and you don’t eat up battery life.

Today we Casted Gummi Bears from YouTube (the DDs are on summer holiday). The whole process was very slick. Finding the content on the YouTube app on the iPad is very easy with the combination of text search and swipe select available. The app found the Chromecast and started Casting without me needing to delve into the settings menu.

This illustrates a few fundamental changes that the TV industry is going to need to navigate. Firstly price: the price for the content, and crucially now the hardware too, is either free or close to free. I’m guessing that Google made or even lost money on the bundle that I bought (Chromecast + season 1 + Gummi Bears on YouTube). So where’s the money to be made from the value delivered? I think it’s from the bundle. Even though Google probably lost money on the bundle, I’m guessing that NBC-Universal / Sony Pictures (the show distributors) didn’t, because £16 is still a healthy amount for a virtual box set. And let’s also consider that the full value chain is now different; let’s not feel sorry for Google since it served the ads that engirdled the Gummies.

Secondly, the bundle: The bundle that consumers want isn’t the bundle that Cable traditionally provides. It’s no longer about buying your entire digital world from one shop. The key to the kingdom is connectivity; bundling broadband, 3/4G, Wi-Fi is the utility of the future. Everything else is cheaper, and crucially better, from sources other than Cable. Telephone calls are better from a mobile. TV is better when Casted. The bundle is now about what I want to do (I want to watch TV so I want a bundle of content, hardware and assume Wi-Fi) rather than how I want to do it (line rental + broadband speed/usage/time allocation + hardware).

Thirdly, convenience rules: I weep at the quality of picture that we’re now watching. YouTube is pixelated, BT Sport HD is barely better than SD when Casted, Now TV is only 720p – none of these compare with the video (and audio) quality when we watch a Blu-ray. But we very rarely watch a Blu-ray nowadays, because it’s much more convenient to search and swipe our way to find something to watch, than to get up and go over to our wall of discs. The argument that better quality commands a premium is delusive, at least for the majority. And it’s by volume selling to the majority that the only real money is now made.

The signs and portents are for consumers to just want a dumb broadband pipe. And there is a lot of money to be made by Cable in connectivity just as a utility. However, there is also opportunity – by separating the concerns of connectivity and services that use the connectivity, the opportunity is to both compete and collaborate with web TV providers. Compete for service revenues through cheaper, better, more innovative services. Collaborate by generating demand for connectivity. Make revenue by doing both.


From the perspective of consumers, the burgeoning options for web TV is starting to bring the problem of too much choice. Each STB has its exclusive content, so to watch it, the consumer needs to understand and navigate all the packages to find their combination. This complexity is to the detriment of the proposition, and to the market as a whole. Each STB might be cheap at £16 a pop, but I now have 4 of them costing over £300, just to get all the content we want to watch. Suddenly it doesn’t seem so cheap.


More in this series: part 3, part 5.