DFRobot FIT0441 pinout

I ordered two FIT0441 brushless motors for use in v2 of my balancing robot. The DFRobot wiki page on the motor is incorrect so I thought I’d blog about it so someone else can find it 🙂 The motor comes with a 5 pin JST-SH cable with a white end and a black end. The white end goes to the motor. When looking from the back of the motor with the socket at the 6 o’clock position, the wires are:

ESP8266 IO bridge looks cool – it exposes the I/O of a ESP8266 wifi module including the GPIO, I2C, PWM, ADC, and UART via a line based telnet interface.

A toy PL/0 compiler

I’ve released a toy compiler for the PL/0 educational language at or

I did this as, despite working with compilers for a fair part of my life, I’d never written one from scratch. I chose PL/0 as it was designed by a local legend, Niklaus Wirth, who is also the creator of Pascal and Modula-2.

Maker Faire Bodensee

We went to Maker Faire Bodensee on the weekend. The kids spent so much time with Paula Pongratz’s Post-apocalyptic jewlery that they missed most of the rest (heh).

Other standouts were the breadboard / pus pin based electronic organ from [

Elektronikmuseum Tettnang]3 and the marshmallow building challenge by Toolbox BODENSEE. I also want to have a look into the Minecraft smart-home, Nodebots, and Freifunk.

Sending music over light

Someone recently mentioned that you can ‘hear’ a TV remote control by hooking a solar panel to a speaker and pointing the remote at it. It was a rainy weekend this weekend, so my son and I gave it a go: The circuit is simple: a solar panel from a toy, a ~1 Hz RC highpass filter to get rid of the DC component, and an amplified speaker for the output.

Web connected NeoPixel ring

It’s taken a while (as you can tell from the date on the box), but here’s my web connected NeoPixel ring: Chroma trail: a comet with a trail that cycles through the colours of the rainbow. I had to turn the brightness down so the camera didn’t saturate, as you can see in the next one: Raindrops: randomly coloured drops that fade away. This is a WRTnode board running a Python server.

Fading text on an OLED screen

Here’s my hack of the moment: text fading in on a OLIMEX 128×64 OLED display. The interesting bit is that this is a TTF font which is rendered by SDL2 into a buffer, dithered into black and white using Floyd-Steinberg error diffusion, and then written out using the Intel IoT upm display driver. Optimizing the bulk write routine got the frame rate up from ~4 FPS to ~15 FPS.

Adding buttons on the Linkit Smart

Here’s what I found out while trying to add buttons to the OpenWrt based Linkit Smart. The flow is: Keys are defined in target/linux/ramips/dts/LINKIT7688.dts gpio-button-hotplug emulates gpio-keys-polled and generates uevents. The uevent is received onver netlink by procd in plug/hotplug.c The event is dispatched via /etc/hotplug.json The standard dispatch rule calls /etc/rc.buttons/$BUTTON The DTS fragment is: gpio-keys-polled { … btn2 { label = “btn2”; gpios = <&gpio0 2 1; linux,code = <0x102; }; where the <&#038;gpio0 2 1> picks the second pin from the zeroth port i.

Hack of the day: scrolling text

I did a quick hack today and wrote a scrolling text app for an Adafruit 8×8 LED display I had lying about: The app is written in C++ using the Intel mraa I/O library (which looks pretty good) and running on a WRTNODE MIPS dev board with OpenWrt. The interesting bit is the text rendering: I started with a 6×8 bitmap font then added automatic width detection, blitting for rendering to the buffer, and blitting for rendering a scrolling window on the buffer to the display.

The Boost libraries

I’ve been hacking on a personal project to make it easier to expose HTTP based devices that are behind a restrictive NAT or firewall. The code needs to run on a OpenWrt based MIPS board1 which limits my language choice – Python3 is out as it’s too big, and Go on MIPS32 via gccgo on OpenWrt is… tricky2. I ended up writing the app in C++ and I’ve been quite impressed with C++14 and the Boost libraries.