Posts

A toy PL/0 compiler

I’ve released a toy compiler for the PL/0 educational language at https://juju.net.nz/src/cgit.cgi/pl0.git/ or https://github.com/nzmichaelh/pl0. I did this as, despite working with compilers for a fair part of my life, I’d never written one from scratch.

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 [

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:

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: https://juju.net.nz/michaelh/blog/wp-content/uploads/2016/02/Vid-20160207-165253-1.m4v Chroma trail: a comet with a trail that cycles through the colours of the rainbow.

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.

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.

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: https://juju.net.nz/michaelh/blog/wp-content/uploads/2016/01/udisplay-with-scrolling-text.mp4 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 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 board 1 which limits my language choice – Python3 is out as it’s too big, and Go on MIPS32 via gccgo on OpenWrt is… tricky 2.

Serial to NeoPixel bridge

I’m hacking on a project to hook a NeoPixel ring up to the internet. I don’t have a good reason why, but it’s a good excuse to work with OpenWrt, TURN servers, and some blinking lights.

Z-84 flying wing

Hobbyking had a free shipping promotion recently, so I picked up a Wing Wing Z-84 flying wing like all the cool kids have. It’s quite fun if a bit noisy. The 1500 mAh 2S batter lasts 15 minutes, which is crazy long, and it’s quite interesting how a pusher propeller changes climbs and loops – you need momentum as there’s no propeller to caster under.