Taking an old lens for a walk
/We actually had some sunshine
It turns out that fifty year old lenses can actually produce quite nice pictures…
After this shot the sun vanished…
Rob Miles on the web. Also available in Real Life (tm)
We actually had some sunshine
It turns out that fifty year old lenses can actually produce quite nice pictures…
After this shot the sun vanished…
I need to do a bit of fine tuning..
We did some printing with multi-coloured filament today. It came out rather well (although I need to improve bed adhesion and improve the slicing a bit). If you’ve never tried it, you really should.
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.
Simon did the poster…
If you’re lucky enough to be a student at Hull University I’m doing a Rather Useful Seminar there next Wednesday. I’m going to bring in a few of the things that I’ve built over the last few years and talk about how much fun you can have making inventions of your own. It would be lovely to see you.
They’ve just released a “new” Beatles song created, of course, with the help of AI. It is said that if you listen very, very, carefully to the track you can hear in the background the sound of the bottom of a barrel being scraped….
The Joys of photography
There are two negatives above. One is a picture of a black cat in a coal mine, and the other is shot of a white cat in a snowstorm. Can you tell which is which?
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.
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.
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.
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.
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.
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.
I get my copies of the magazine from Readly
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.
YOu could have one of your very own….
We’re having our next Hardware Meetup in Hull library in the Makerspace on Wednesday 1st November starting at 5:30pm. It’s all about 3D printing. There’s an exhibition of 3D printing on at the Makerspace at the moment and lots of stuff worth looking at, whether you own a printer or are thinking of getting one.
It would be lovely to see you there. If you have something you’ve printed that you want to show off, bring it along. There will be a small (3D printed) prize for the object that everyone likes the most. I’ll be talking about the fun you can have making 3D printable objects from Python code - which is something of a thing for me.
We’ll also have free tags of fun to give away, and we might have a Tag Joust championship. It would be lovely to see you there.
If you are around earlier on Wednesday I’m going to be in the Makerspace fiddling with stuff for the entire afternoon if you want to drop round for a chat about hardware.
This picture was taken with my 3D printed film camera
Today I went down to Hull MakerSpace to hand over some bits and bobs for an exhibition of 3D printing. Lee-Ann is organising the display and some events to make folks more aware of what 3D printing can do. I’ve contributed a Hull Pixelbot, some Connected Little Boxes, tags of fun and a few other things. If you’re in Hull over the next few weeks you can take a look at the stuff. There are some amazing printed models using some fantastic types of filament. Great fun.
Perhaps I can sell it on ebay as “untested”
Things were going well today. I was working on my clever telephone and I had the code doing just about what I wanted with the hardware. So I thought I’d pop the whole thing back in the phone to make it easier to work on.
I shoehorned the Pi Zero and the power supplies and MOSFET controllers into the case and it seemed OK. Then I discovered that some of the hardware interfaces (notably the switch that is triggered when you lift the handset) didn’t work. So I took the lid off and started tracing circuits. At one point I must have let one of the GPIO input wires touch a terminal on the telephone bell coil. At this point a rather unfortunate sequence of events occurred:
The bell terminals are close to ground voltage level, because the bell coils have low resistance. Touching the bell terminal with the wire caused the GPIO input to be pulled low, making the software think that the handset switch has been triggered.
The phone program rings the bell when the handset changes state. This is because when you lift the handset on an old phone you hear a “ding”. So turns on the bell coil to start the ding. This sends 35 volts to the coil……
This 35 volts goes up the GPIO input and blows away the Raspberry PI. Completely dead. Could be used as a heater but not much more.
The good news (if there is any) is that I happen to have got a spare device in stock just in case something like this happens, so I just have to wire it into the circuit. I’ve also put all my software on GitHub already, and so I’ve only lost around 20 minutes worth of coding.
I’m going to redesign the hardware connections to reduce the chances of this happening and insulate the bell terminals properly. A thing like this is only a problem if you don’t learn anything from it……
There’s a lot of muttering about the dangers of AI but there is also no denying that there are situations in which it is genuinely useful. Today I wanted to make sound on a Raspberry Pi from a JavaScript application. So I asked ChatGPT:
How do I play audio using a JavaScript program running in node on a raspberry pi? I want the sound to come out of the Raspberry Pi device.
ChatGPT came up with an npm module called Speaker which looked like it was just the job. I tried to install it and the installation failed. And this is where it gets proper. I asked ChatGPT:
The npm speaker command fails with an error locating alsa/asoundlib.h. Any ideas?
ChatGPT recognised the error and told me to install the ALSA development headers. I did that and the installation worked fine.
Now, none of this is really rocket science. ChatGPT “knows” this stuff because it has linked things together and can establish the context of a conversation and use this to find the correct items. But it is still darned useful.
My advice with things like ChatGPT is that if you have a context in which you think it might be useful you should try it. If it works, good for you. If it goes wrong you will learn more about problems with the way the technology works. Either way, you will be brushing up on your AI interaction skills, which is something you need to do.
The’ve used my old picture from way back - which is wonderful
I got my Hull University staff card today. I’m back on the staff of Computer Science (at least until May next year). I’m supervising a project (which I always regarded as one of the best parts of the job). Such fun.
apparently this place is full of folks playing video games on a Wednesday afternoon. I’ll have to try and drop in….
Went into the university for a meeting about the work I’ll be doing with them. They’ve had a bit of a makeover in the Computer Science open area. It’s all very posh.
Rob Miles is technology author and educator who spent many years as a lecturer in Computer Science at the University of Hull. He is also a Microsoft Developer Technologies MVP. He is into technology, teaching and photography. He is the author of the World Famous C# Yellow Book and almost as handsome as he thinks he is.
Begin to Code with JavaScript is now available for purchase and download. You can find it here