Made a new friend

Great fun to build

Spent a happy few hours over the weekend building one of these. It’s powered by a Raspberry Pi 4 (I needed to get the one with 4G). it works very well. There’s an iPhone app that you can use to control it remotely. The default configuration has the robot setting up an access point you connect your phone to before you run the app. Then you can steer the robot around viewing the world through its onboard camera. You can also have the robot pick up and recognise the red, green and blue blocks that come with the kit.

I thought that it would be powered by the Robot Operating System but it turns out that everything is controlled by some well written Python code that controls the motors directly. The vision system uses OpenCV to find coloured bricks and perform line following. It would be quite easy to modify this code and make the robot perform new tasks. There is also a program you can use to record robot arm positions and create behaviours.

There were a couple of tricky parts to the construction. The first was downloading the software itself. The links are on a card which comes with the robot. Find a way to open these on your desktop computer (they are given as QR codes) and you’ll be sent to a Google Drive folder which contains the stuff you want. There are also links to videos which you must watch before you build anything. The second tricky bit was attaching the arm servo cables to the little Raspberry Pi hat that connects to everything. You are just pushing sockets onto the pins, but one of the sockets (the one for the fan) has some alignment fins on the side that get in the way. One fix would be to chop the fins off, but I opted for slightly bending the pins to make room.

My robot worked second time (I’d not connected one of the robot arm servos properly) and was great fun to drive round. If you want the vision system to recognise the coloured blocks properly you will need to make sure the surroundings aren’t too confusing.

If you want a powerful and robust little platform I can strongly recommend it. One tip: You’ll need some rechargeable batteries for it and these are not in the kit. I got myself a flashlight, charger and some batteries in rather a nice kit I found here.

Thermometer of lies

I reckon it should be around -20 in here..

I did some film developing today. The developer (the liquid you put the film in to convert the exposed areas into tiny particles of silver) needs to be at a particular temperature for a given development time. I’m a big fan of the Massive Development Chart which gives development times for all kinds of film and developer combinations.

Anyhoo, I’ve been using the thermometer above to measure the temperatures and today I noticed that I had to get the water really warm to get it to the indicated 20 degrees. Which seemed wrong. A quick comparison with a cooking thermometer showed that it was indeed very wrong.

This rang a bell. I’ve noticed that quite a few of my pictures appear grainy and a bit murky. As if they have been developed too long. Which is what would happen if I had the developer at a high temperature. I’ve even been shortening the developer time to compensate for this. It never occurred to me that I was using the wrong temperature. I used the proper temperature and the recommended time and the pictures came out rather well.

Microcord up town

Princes Quay looking good

We got some good weather today so I took the Microcord up town today and grabbed some shots.

There’s a bit of camera shake on this one because I keep catching the camera shutter lever on my fingers.

I really like this old camera. It forces you to move slowly when taking a picture (which can be annoying for people you are with) but I think the results are worth it.

Fun with a Microcord

It has the most amazing lens caps……

Yes, I’ve bought another camera. And yes, it is very old. Actually around the same age as me. It was made by a company called “Micro Precision Products” which started making cameras in the 1940’s and gave up in the 1980’s. They made a range of different types of cameras for press and technical use, and in the 1950s they made a couple of “twin lens reflex” cameras, of which the MicroCord was one. It is based (as in “Here’s one - see if you can copy it”) on Rolleiflex cameras which were popular at the time.

A twin lens reflex camera has two lenses. The top one is used for viewing and the bottom for photographing. You compose and focus by looking down into the top of the camera at a ground glass showing an image reflected from the viewing lens. Both lenses are mounted on a plate which is moved backwards and forwards to adjust the focus. The idea is that if the view in the viewfinder is sharp, the photograph being taken will be too. This was back in the day when you actually had to focus your photographs.

I took this shot on the university campus

I’m still getting used to it, but I’m having fun at the moment.

Rather Useful Seminar

I also took a picture with the 3D printed camera. We’ll have to wait to see how that one turns out….

I did my Rather Useful Seminar today all about the joy of making hardware. Thanks for being a wonderful audience. You can find the slides here. I promised some links. Here they are:

C# Yellow Book: http://csharpcourse.com/

HackSpace Magazine: https://hackspace.raspberrypi.com/

Pomodoro Timer Repository: https://github.com/CrazyRobMiles/PICO-Talking-Pomodoro

FreeCAD design tool: https://www.freecad.org/

Bluetooth chord keyboard: https://github.com/CrazyRobMiles/PICO-blue-chords

KiCAD pcb layout tool: https://www.kicad.org/

Pure Data audio manipulation language: https://puredata.info/

Pico MIDI Cheesebox Repository: https://github.com/CrazyRobMiles/PICO-MIDI-Cheesebox

Crackers Controller Repository: https://github.com/CrazyRobMiles/PICO-MIDI-Crackers-Controller

Hull Pixelbot Repositories: https://github.com/HullPixelbot

Connected Little Boxes Respositories:  https://www.connectedlittleboxes.com/

Lights in Names Repository: https://github.com/connected-little-boxes/lights-in-names

It was great to be out in front of a student audience again.

The return of the Hull Pixelbot

Actually it never went away…

A few years ago I made some little robots called “Hull Pixelbots”. They have this name because they are from Hull and they have a pixel on the top. We had quite a lot of fun building them and playing with them, but then I went on to other things.

Well, I’m going back to them. I’m going to make a version with a PICO rather than the ESP devices I’ve used before, create a web based code editor and bring the robot into the “Connected Little Boxes” fold.

Should be fun.

3D Printing Meetup

This was not taken with a 3D printed camera

We had the November hardware meetup today at Hull Makerspace. There was a lot of talk about 3D printing, and we all took a look at the items in the exhibition. There is some great work. Whether you are new to 3D printing or have already burnt your fingers (only kidding) there is stuff there to learn from. I’ve just discovered “3D” printing filament. The filament contains multiple colour strands of silk PLA, rather like the stripes in toothpaste. This gives a fantastic multi-coloured finished to objects that looks amazing. I’ve ordered a roll to play with.

You should go

The exhibition is on for a while longer. New items are being added all the time. I’m going to pop in on Saturday 11th November to see what’s going on.

Redphone for Halloween

Only a bit scary

The “RedPhone” lives. The bell sounds like a real phone. But the insides are now possessed by a Raspberry Pi running JavaScript…..

This runs on the local network

It hosts a web page into which you can type messages and send them to the phone. When you send the message the phone rings and if you pick up the receiver you hear a ghostly voice dictate the message to you. If you pick up the receiver to make a call you get the dial tone. If you dial “2” and replace the receiver the phone will ring a few seconds later and deliver a ghostly message of doom:

randomMessages = [
    "I know what you did last summer",
    "Is that you, Boris?",
    "Look out of the window.",
    "They are on to you.",
    "Look behind you."
    ];

Other messages may be available later….

It’s been great fun to build. You’ll be able to find out all about it an upcoming article in HackSpace magazine.

Curse you British Summer Time

You’ll never guess where I bought this

The good news is that my Agile Octopus Tariff Display (which tells us how much electricity will cost us each day) handled the clock change yesterday with aplomb. It just worked. The bad news is that one of my clocks can’t be adjusted because the little knob that you turn to move the hands has broken. So I’ve taken the battery out for an hour.

In March next year I’ll have to take the battery out for 11 hours. Perhaps I should make a “time corrector” device. You plug it into the clock in place of the battery, tell the “time corrector” the time the clock is showing and over the next day it makes the clock correct.

Speeding up writing with ChatGPT

I’m painfully aware of the fact that AI has the potential for huge problems on lots of levels. But I don’t think ignoring it is a viable solution. Today I was writing a section of the red phone article (coming to a magazine soon). It was a bit about how JavaScript async and await works. I’d come up with some text and I said this to ChatGPT:

“Would this be a good explanation of async and await: imagine that you could create new versions of yourself at will. If you need to queue to buy something you just create a new version of yourself, put that in the queue and then go about your business. At some point the “new you” will reach the head of the queue, get what you want and then call you and say it has finished before vanishing in a puff of smoke. That’s how awaits and promises work. “

I got this response:

Your analogy is creative and can be a fun way to explain how await and promises work, especially to someone with a vivid imagination. It captures the essence of asynchronous operations, concurrency, and non-blocking behavior, but it might be a bit metaphorical for some audiences who prefer more technical or straightforward explanations.

Here's a breakdown of your analogy:

Creating new versions of yourself represents spawning asynchronous tasks.

Putting a new version in the queue and going about your business relates to the non-blocking nature of asynchronous tasks.

The "new you" reaching the head of the queue and getting what you want symbolizes the completion of an asynchronous operation.

The call and the puff of smoke represent the resolution of a promise and the continuation of your code.

While this analogy can be engaging and illustrative, it's essential to gauge your audience and their familiarity with programming concepts. Some may find it relatable and memorable, while others might prefer a more technical explanation. In many cases, using both a metaphor and a technical explanation can be a helpful way to cater to different learning styles and levels of understanding.

I think this was generally useful critique. It turns out that you ChatGPT doesn’t just answer questions, it can also make sure your text makes sense. Although I can’t help wondering what it would have said if it didn’t like what I’d written.

Speed up Visual Studio Code Remote Development

These are the two you need to disable.

I’m writing all the code for the red telephone project in JavaScript as a node application. This is because it makes it very easy to host a website on the phone. Also I need a lot of multi-threading and events stuff and JavaScript’s await and async stuff makes this so easy to write. Also, I like writing JavaScript.

I’m writing the code on the Raspberry Pi W that is powering the phone. This is a really useful thing to be able to do. I can set breakpoints which are triggered when hardware events occur. Then I can step through the code. I’m using Visual Studio Code, but the environment is running on my PC and I’m using the amazing Remote Development feature to develop on the Pi. But it is not without its problems. When I started doing this, things would work fine for a while and then suddenly the Raspberry Pi would lock up and progress would grind to a halt.

I did some searching and thanks to this wonderful post I discovered how to fix it. It turns out that some of the language plugins for Visual Studio Code consume humungous amounts of computer power. And when they wake up on the Raspberry Pi it is pretty much game over for development on the machine. If you search the extensions for “@builtin type” and then disable the two shown above you’ll find that things work swimmingly. You miss out on a few useful goodies, and you’ll have to re-enable these to get them back, but in the meantime at least you’ll be able to do useful work on a device costing less than a couple of burgers and fries.

Soldering Idiocy

The only person I allow myself to get really cross with is me. Today I had a perfect opportunity. I’d just received the rather nice MOSFET power switches you can see above. They are rather nice because you can connect them directly to a 3.3 volt signal and they will switch a high power load (in this case 35 volts going to a telephone bell). So I soldered a pair to a prototyping board. They’re the funky blue things with the terminal blocks.

We’ll leave aside the quality of the soldering on the connector terminals at the front of the board. I was finding it hard to make any kind of soldering work when I did those. I really did think I was losing my touch. But it turned out that it was because the solder bit had broken inside the soldering iron and the temperature had got set way too low.

The reason I got really annoyed was because the MOSFET board on the left hand side has been soldered into the wrong column. It should be one position to the left. This means that all the wires (several of which are underneath the board) are in the wrong place. Idiot. And especially idiot because I thought to myself “Careful not to solder this in the wrong place” as I actually soldered it into the wrong place.

Oh well, I’ve got spares.

Agile Octopus Tariff Display in HackSpace magazine

I get my copies of the magazine from Readly

If you’re wondering what that distant rumbling noise is, it might be crowds of people rushing to the newsagents to buy their copy of HackSpace magazine so that they can read my article in it.

Or it might be a bus going past.

Anyhoo, the article is out there. You can find the project on GitHub here.

Minox Scanning Report

The height steps are in .2mm because that’s the print layer height

The story so far: “Rob has become mildly obsessed with getting the best possible results scanning the tiny negatives produced by his Minox camera. He’s 3D printed a holder for his scanner which had different negative heights. The idea is to scan a negative and determine which height works best”. Now read on…

It wasn’t taken for testing, but it works really well

I took the picture above down at “the dock” in Hull. It is of the C4DI building and a tiny bit of the tidal barrier. The railings going off into the distance are a very good test for resolution. I used my “different height scanner thingy” (really must think of a better name) and got the following results:

A print of the entire image at this magification would be around 24 inches or so across

It was interesting to see the difference that 0.2mm height makes to the image quality. The best way to see it is to look at the lamppost at the end of the walkway. That is better defined against the background in the -0.2mm height scan. The next thing to do is to print a complete scanning frame for that height.