3

(coco) #1
M

PICKING


THE Perfect


LENS

EXPANDING HORIZONS
C and C++ are by no means the only languages that
can be used with a microcontroller; a popular choice,
for example, is Python. There is a version of Python
called MicroPython (you may also encounter
Adafruit’s CircuitPython variant) that is tailored for
microcontrollers, and particularly if you have
encountered Python before on a platform such as the
Raspberry Pi, it has a fairly minimal learning curve.
Instead of being a compiler that places a binary file on
the microcontroller in the manner of the Arduino IDE,
MicroPython is an interpreter that directly runs raw
Python code on the microcontroller itself. It provides
access to the microcontroller features as well as the
familiar Python prompt via a serial link. On devices
such as the ESP8266 with a network connection, it
even provides access to the prompt via a web browser.
Finally, there is a class of development environment
that operates entirely within a browser. All the coding
is done in a browser IDE, the compiler is situated on a
web server, and the resulting binary file is presented as
a download that can be uploaded to the microcontroller
board. In some cases, such as the BBC micro:bit, the
board appears as a USB disk drive, so this is as simple
a process as copying the binary file into the drive for it
to run. These environments can sometimes have
fewer features than their more traditional counterparts,
but time will inevitably deliver upgrades to the
software, and you can’t beat them for simplicity.
Whether you are emboldened to try pastures new
or you are happy on familiar ground with your

Arduino Uno, it’s never a bad thing to know your
way round a few of the other contenders in the field.
Whichever you select, you can further inform your
choice by looking at how much a particular
board has been adopted by other makers,
and by looking at their projects to get an
idea of how straightforward it might be
to work with.
When people try new platforms,
they do so by creating new and
exciting projects. We look forward
to what you will create with your
new boards, and whatever they
are we hope to see them within
these pages.

NOT CONSTRICTING AT ALL:
THE PYTHON-BASED ADAFRUIT
CIRCUIT PLAYGROUND EXPRESS

Adafruit produces a range of boards
designed to be programmed using
Circuit Python – a variant of the popular
Python language that’s designed for
microcontrollers. Development can either
be through an editor such as Mu, which
compiles code that can be transferred to the
board over USB, or via the serial console

that allows you to run interactive code. It’s a
simple device to use and comes fully loaded
with a range of hardware sensors. Take a
look at our review on page 126.
Anyone with an annual print subscription
to HackSpace magazine will receive a free
Circuit Playground Express in the post. See
page 54 for more details. Have fun with it!

NOT JUST A TOY:
THE BBC MICRO:BIT

The BBC micro:bit is a single-board computer with integrated
Bluetooth Low Energy, some buttons, and a simple LED matrix
display. It is well known because of its creation as a teaching
aid and its having been given to schoolchildren. Its low price and
ready availability make it an attractive proposition.
The micro:bit is designed as a self-contained piece of
hardware with an attached battery pack containing a pair of AAA
cells, but it also features a selection of interface lines on an edge
connector. One disadvantage, though, is that the connector used
is a slightly unusual one.
Under the hood, it is an ARM board (in fact, at heart another
Mbed), though we are treating it as a separate platform here
because of its unique software development environment.
Because it is designed to be used by children, it has a selection of
web-based IDEs (from a simple block-based drag-and-drop one
to a Python environment), compilation happens in the cloud, and
transfer to the device is extremely simple.

Above
The BBC micro:bit is a
specialised Mbed board
aimed at schoolchildren
Credit
Ravi Kotecha
Below
The Circuit
Playground Express
packs a lot of
hardware onto a
small board
Free download pdf