Showing posts from 2017

MonkMakes boards for the micro:bit

MonkMakes is the Hardware business started by Simon and Linda Monk to complement Simon's many excellent maker books. They've just released three new boards for the micro:bit. Today I had a play with their sensor board , which has a light sensor, a microphone and a thermometer. It's incredibly easy to connect to the micro:bit. I'm clumsy, but I wired it up in a minute at most. There's sample Python code a little way down on the MonkMakes website page , but WordPress has mangled it a bit; the code wouldn't run until I replaced all the em-dashes with minus signs and replaced all the double quotes. There are also a lot of redundant blank lines, but that's just a cosmetic issue. Once you've fixed those issues you can use Mu 's REPL to display the light level, temperature and sound level at pone second intervals. The microphone seems to be directional. I had loud music on when testing, which didn't register, but it responded well to a clap or

The ClusterHat goes Stereo!

Yesterday I described my first experiments with the Raspberry Pi ClusterHat. I've had a play done a bit more serious research since then and I now have two Pi cam2s connected to two of the Pi zeros. Now I can take stereo photos! The first pair of images aren't of great artistic merit, but they prove things work. Morten and I plan to build on this using APL to convolve the two images in order to determine the distance from the cameras of each pixel in the scene. Once the ClusterHat and PiCams are mounted on a mobile base we hope we'll have a mobile robot with stereo depth perception. Follow progress on @rareblog and @dyalogapl!

Clusterfun with the Raspbery Pi Clusterhat

Want to build your own supercomputer at home? You can take a step in that direction with a Raspberry Pi 3, four Pi zeros and a ClusterHat . The ClusterHat allows you to connect four pi Zeros to a Raspberry Pi controller and network them all together. You've now got 8 cores and 2 Gb of memory to play with - not quite up to Cray computing standards, but enough to explore some modern clustering software. Avoid these snags! I've just got my cluster up and running, with four ssh sessions from the controller to the four zeros. The instructions on the ClusterHat website are pretty clear, but I did hit a few minor snags before I got everything working smoothly. Make sure you have a 2.5 Amp power supply. The first is entirely my own fault, but don't make the same mistake! I used an old-style power supply which was rated at 2 amps. When I started the fourth zero, the power supply became overlaoded and Bad Things Happened. The controller crashed and corrupted its SD ca

Programming with MicroPython by Nicholas Tollervey

I've just finished reading the final version of Programming with MicroPython by Nicholas Tollervey. I love MicroPython - it helps me to develop working code faster, and it's fun to use! MicroPython has been around for a while. I first encountered it when I met the original author, Damien George, at an Open Technology seminar at Cambridge. More recently, I've been exploring MicroPython on the BBC micro:bit , and in the last few days I've been working on a doorbell extender project (more details soon!) using the Adafruit Feather Huzzah ESP8266 , a small, low-cost board with WiFi capability.  All these and more are covered in Tollervey's book.   Programming with MicroPython: contents The book starts with a forward by Damien George, and continues with an introduction to the language. MicroPython is an almost complete implementation of the popular Python Language. It comes with its own set of libraries which allow you to access the features of the micro-c

Resistomatic - an Arduino-based autoranging ohm-meter

Sorting resistors is a pain If you've been having fun with electronics for a while you've probably got a box with bits in . I've been playing with electronics for six decades and I have lots of boxes, many of them containing random collections of resistors. Resistors are cheap, but I hate waste, so from time to time I decide to empty some of the boxes and put the resistors away in their proper homes. It ought to be easy, but it's a pain. I was never good at reading colour codes, and the problem has got worse with age. What I want is a simple, quick autoranging ohm-meter that I can use to measure resistor values. So I'm making resistomatic . Resistomatic requirements Most of the resistors I use are 1% or 5% tolerance metal film resistors in the range 220 Ohms to 100K Ohms. Almost all the values  are in the E12 range. (E12 values are multiples of 1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2). I'll be happy if resistomatic can achi

Program the Proto-Pic EDGE using O O MicroPython - part 1

Good programmers are Lazy. According to Larry Wall (a very famous programmer) laziness is a virtue. Lazy programmers come up with labour-saving solutions. If you’d like to save time for yourself and others by writing MicroPython code that’s easy to re-use, read on. The article assumes that you are already familiar with the concepts of Object, Class and Composition, and that you know how to write a class definition in Python. If you’re not familiar with Object-Orientation (O O) in Python  you may find the code hard to follow. I’ve given a very brief introduction to O O later in this article. There are several ways to learn about Python O O. There’s an ‘official’ tutorial here , but I’m not sure a beginner would find it easy to follow. There’s a whole book on the subject from Packt, and it looks good. It represents quite an investment in time and money, but I think it’s worthwhile if you are serious about improving your Python O O skills. I will probably get round to