DotNetSheff-York Air Quality with added Top Hat

Thanks to the DotNetShef folks for the picture.

I was supposed to be going to a couple of .NET events to talk about Air Quality earlier this year. But instead I’m sitting at home in front of a camera waving my arms around. It was great fun though, and I hope that everyone enjoyed it. You can find some code resources for the presentation here.

If you want to get involved with our efforts in Hull you can find us on Mattermost here

A look at the Raspberry Pi High Quality Camera

I’m beginning to wonder why we need “proper” cameras. My smartphone can now produce pictures that I can use for just about anything. And now you can get a high quality camera for your Pi. You can even swap lenses like the professionals. We are looking for something we can use to track robots, and so I thought I’d get one and see how well it works. I bought the “telephoto” lens because it seemed to be higher quality, but you if you can track down “C-mount” lenses (they are used in CCTV and video cameras) you can have what ever kind of lens you like. There is also a “wide-angle” lens which I’d quite like to have a play with now.

The camera connects to the Pi in just the same ways as previous cameras, but there must be an awful lot more data going down that little ribbon cable. I attached my camera to a Pi 4 and had a play. First thing I did was point the camera out of the window and take a picture. I got a 6.5 Mbyte Jpeg image. The top right hand corner of it looked like this:

This is not the entire picture. This is a tiny crop of the top right hand corner. There’s a lot of chromatic aberration going on (that’s causing the purple fringes) but detail is pretty good. Watch what happens when I stop it down a bit though.

Suddenly the image is much, much better. “Stopping down” means reducing the size of the hole that lets in the light. This means that the lens has to do less work and so I’d expect the image to be a lot better. The downside is that a smaller hole means less light, so the sensor takes longer to capture an image. This can lead to blur unless you use a tripod or increase the gain in the camera and get more noise.

I don’t particularly want to show you the view from my window, but what I will say is that the camera is doing a good job here. Once I’d taken some pictures out of the window, I took some of my desk.

This is the entire image of a corner of my desk. The minimum focus distance is not great for the tele-photo lens, at about 15 inches.

This is a 100% crop of the above picture, which should give you an idea of how much of the frame the branches above took. It should also give you and idea of the great quality of this lens and sensor combination.

This is a crop of the same image taken with the lens aperture wide open. This shows that you can get some lovely “out of focus” effects with this camera.

Good things to know:

There’s a really good book about how to use the camera. It’s a free download from MagPi Magazine here.

if you want to use the camera preview with VNC remote desktop you have to enable direct capture in the Troubleshooting Menu of VNC Server.

if you want to use VNC remote desktop to a Raspberry Pi with no HDMI monitor connected you have to use raspi-config to set a specific desktop resolution using the Resolution Option in the Advanced settings.

You can adjust the lens distance using a tiny spanner, but I’ve not done this. So it might be possible to get even sharper pictures.

The picture quality of the high quality camera is very good. But then again you’ll be paying around 100 pounds for the sensor-lens combination and so you’d expect something pretty impressive. I’m not sure how much the sensors in mid-range compact cameras cost, but I’d expect them to be around the same quality.

The “telephoto” lens that I got has quite a narrow angle of view, so if you want to do general stuff I’d suggest getting the wide angle lens instead.

Things will get properly interesting when these devices get into the hands of all the smart people that like to play with Raspberry Pi. There is considerable scope for some very interesting devices and if you want programmatic access to a very high quality image you’ve got that now.

Windows for Free

In 2013, after a lot of effort, I bought myself a new laptop. It was a new fangled (for the time) UltraBook. I’ve used it on and off for years, lent it around the family and last week I popped a 40 quid SSD into it with the aim of speeding it up a bit. That worked a treat. Then I discovered that someone I know needs a laptop to work from home. And of course their employer won’t/can’t supply one.

So on Thursday I took the 7 year old machine from 0 to fully configured laptop in about 30 minutes. By the time I’d finished I had a newly setup machine with a new Microsoft Outlook email account. At no point did I enter any licence keys and it just worked. Just a tiny bit of fixing up because of a faulty touch screen.

The machine is well powerful enough and apparently it works a treat. Apple make a big fuss about the way they support their new smartphones for five years. Big deal. This was a seven year old laptop and it just worked. The Windows 10 installation was a breeze, I even had Cortana talking me through it.

If you have an old laptop that is not doing much, buy yourself a cheap SSD (I got a 250G one from Amazon for around forty quid) and slap a free copy of Windows Home on it. If you’re a student you can then top that off with a free copy of Microsoft Office 365.

Rob in Hackspace Magazine

I’m a writer again! Hackspace Magazine this month have printed my article about using a Real Time Clock to control the power of a microcontroller. They’ve done a really good job laying out the pictures and words that I sent through, and the whole magazine is a very interesting read - as usual.

You can read the article (and the whole magazine) here

Readly looks to be good value

If you like magazines you should definitely take a look at Readly. For the price of a couple of magazines a month you can get to read pretty much all of them. The reading experience is very good on iPad. The magazines load up smartly and moving around them is a breeze. You can also read on your PC. There are quite a few crossword magazines which I thought was a bit silly at first. Turns out that you can screen shot the pages and then print them. So if you like word searches etc etc then that must makes the deal even more compelling.

Some of the “magazines” are those collection ones that you find in the newsagents. I like reading these and there are quite a few, from photography to piano playing.

Our local library uses the RB app to make available a bunch of free magazines (you really should be reading these) but the Readly app is much better and the range of reading is enormous.

If you’re looking for a few things to read during the lockdown I reckon this is a good bet. And you get two months free membership if you sign up.

Note: I’ve not got anything free from Readly, I just think that they provide a good product.

M5 Atom is absolutely tiny

A new computer arrived at our house today. The postman just popped it through the letterbox. The Atom is a tiny new microcontroller from M5Stack. It contains a button, a multicolour led and an accelerometer. It has enough pins to be useful along with a Grove socket.

It’s a little bit bigger than the top of my thumb, it contains an ESP32, it can run MicroPython and hang off Azure or Bluetooth. And you can buy them for six dollars apiece.

I know that the world today is a right old mess, but there are still some amazing things to be found.

Making trivets

I love the way that 3D printing lets you go from an idea to a thing really quickly. Thanks to a what seems to be a worldwide shortage of liquid soap (I wonder why that might be) we now have a soap-powered cleanliness routine. This has led to a need for soap dishes. We’ve re-purposed a bunch of little dishes, but we have the problem of the soap getting wet and icky (and dissolving) in the dish when it gets wet.

We needed something to keep the soap out of the water that runs off it after use. A kind of “soap trivet” that fits in the bottom of the soap dish. A few minutes with OpenSCAD and I had my design. A little while later we had our printed trivets. And now Una can go back to making PPE visors.

If you have a need for a soap trivet, you can find the OpenSCAD code here.