Tuesday, July 26, 2016

BBC micro:bit heads to the classroom


Hands-on impressions Part 1


A new educational computing platform is headed to the classroom this fall. The BBC micro:bit is packed with sensors a kid-friendly design and several programming options it will go beyond just being welcomed to the class, it will be a game changer.  

The few sparse updates over the last two years on the BBC micro:bit have been intriguing but a tease. Now it's set for full deployment this fall to a million 7 year students (that students in the 11-12-year-old range).  The UK students will get theirs for free. The general public can order them now at prices from $15-$20 depending on exchange rates,n though availability is still limited. Personally, as a designer of engineering tools for the K-12 educational space for the last 12+ years Working at National Instruments and LEGO, I was glad to check one out over the last month. 

The micro:bit is a small embedded system designed to help kids learn to code.  But more important than just coding, students will find it easy to make physical things that are controlled by their code. This very tangible experience is particularly valuable for younger students. Interfacing with the real world is the heart of engineering This tie into engineering is balanced but a healthy dose of artful sample projects that will appeal to many kids and will help break some age old geek stereotypes. It will appeal to young artists and engineering minds.

The Physics 

The device is smaller than a business card has rounded edges and no sharp pins. It fits comfortably in a child's hand or pocket.  It’s powered via USB, 2 AA batteries, a separate coin cell board is also available.  Battery bank phone chargers work as well. It has no standard case, but several sites have 3D case designs students can print. Here are just a few you can find on myminifactory.com 


The Logic 

In a field packed with Arduinos and Raspberry Pis, it’s the micro:bit’s I/O that helps it stand out. Every board has an accelerometer, compass, two buttons, and a bright 5x5 LED display. This is a rich baseline for the classroom. It means if you have micro:bit you never need to scrounge around for other parts. Many labs need only the board and standard USB cable. Teachers will greatly appreciate this.


The micro:bit is smaller than many other education and maker boards.  Its round edges, lack of sharp edges, and large connectors make it very kid friendly.

Processors wise, the micro:bit is a comfortable, just-right spot between its Arduino and RPI cousins. There are actually two MCUs on the board. The first is a 32-bit Cortex M0 nRF51822 from Nordic Semiconductor. This MCU runs the student's code. It has 16k of RAM which is just enough for a lightweight JavaScript and Python implementation. People fond of MIT’s Scratch will find the Microsoft block editor a comfortable fit for graphical programming. 16k is reminiscent of the Apple II, a huge computing education success in the classrooms of another era.  

Paired with the Nordic MCU is a second Cortex M0 from NXP. This chip works in the background managing the USB communication by making the device look like a flash drive and providing serial communication. More details on the components and pinouts are here.

The Programming Tools

The micro:bit home site has four programming languages all with editors that run straight from the web and mobile devices. The website has been developed to work offline, a fairly impressive task as it includes a compiler, assembler, and linker that runs in the browser. Some more details on this wizardry are described here.








The programming options include a graphical block-oriented language a bit similar to MITs scratch, and mini version of JavaScript and Python, as wel as a Microsoft script language





Code Kingdom’s JavaScript editor has four editing levels to choose from. Three levels provide drag and drop model. The fourth is a full syntax-directed text editor with auto-complete. Beware, though, when typing your own JavaScript in level four, it's easy to type valid Javascript that unfortunately goes beyond what the micro:bit is capable of, resulting in a generic and not to helpful  “compile error.”

Advanced students and makers can access all of the chips capabilities such as I2C support in C++ using the MBED development platform or use MicroPython from the desktop.


MicroPython has a dedicated editor with integrated REPL for the micro:bit called mu.
Since the micro:bit is based on the MBED platform support for language are in the works such and Espruino's lightweight JavaScript. 

Working with Mobile Devices

Many kids already have a small embedded computer they carry around, their phone. the micro:bit and phone can be connected so that students programs can use sensors on the phone or trigger operations like taking a picture. Overall, the mobile connectivity has a lot of promise but there are still a few bumps to work through. 

The wireless connection is made via Bluetooth Smart support,  a relatively new Bluetooth protocol previously known as BLE (Bluetooth Low Energy) first introduced in Bluetooth 4.0.

Minimum device requirements:
iOS : iPhone 4S, iPad Air, iPad mini with iOS 8.4 and above
Android: most devices that run Android 4.4 (KitKat) 

To connect to the micro:bit you also need it install the iOS or Android micro:bit app. It manages the pairing process. Pairing worked fine from my iPhone 6 and downloading programs was straightforward, though the screen was too small to write new programs.

BT Smart is internally very different from older Bluetooth protocols so some older devices will not support it. Fortunately, most devices now support it so these details are for those with a technical curiosity.

Conclusions:

There are wins in many areas for this board. though in a few places the 1.0 nature is a little more evident. Here are some of the tops wins.

Wins for the classroom
  • Integrated I/O No extra parts needed for many labs
  • Zero install editors, no account needed.
  • No special Windows drivers for USB
  • JavaScript, Python
  • Low Cost
Wins for the kids
  • Designed to be safe
  • Alligator clip connections for simple I/O
  • LED display fits the minimalist emoji world 
  • Small, easy to build around
  • iOS and Android support via Bluetooth Smart
Wins for the maker
  • Easy to program in C++ with ARM’s MBED tools
  • Openly available processor family.  
  • Rugged card edge connector for extensions


Looking Forward, and a note on Bluetooth support.

The tightest and most limiting resource on the micro:bit is the 16k of RAM. That may sound like a lot to an Arduino developer used to having around 2K. However, using any wireless capability of the board will chew up as much as 75% of the RAM leaving you with around 4k. That's why I’m hoping to see variants of the board based on the nRF52. A step up from the nRF51, it is a Cortex M4F (includes floating point support) with 64K RAM and a 64Mhz clock. In 1000 unit quantities it costs about 10% more. 

Overall this is a great start. I expect a lot of good fruit from the efforts put into making the micro:bit and its ecosystem. The combination of size, price, and built-in IO sets a new bar to meet.  In a sense the game changer nature of the micro:bit is less about any specific brand, it’s more about a clear shift to 32bit SoCs particularly the ARM Cortex M-series. There are many maker and developer oriented boards that use chips from this family, but this is the best integration combined with online academic resources.  Educational boards that follow in its footsteps will be able to build on much of the open work it took to get this off the ground. Well done.