Hacking

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:

Maker Faire Bodensee

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: https://juju.net.nz/michaelh/blog/wp-content/uploads/2016/04/VID-20160417-162947-3.m4v 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: 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. I had to turn the brightness down so the camera didn’t saturate, as you can see in the next one: https://juju.net.nz/michaelh/blog/wp-content/uploads/2016/02/raindrops.mp4 Raindrops: randomly coloured drops that fade away. This is a WRTnode board running a Python server.

Fading text on an OLED screen

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: 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 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.