Farewell Mike

A sad day today. I went to the funeral of Mike Brayshaw. I worked with Mike for quite a few years. He was a wonderful fellow who wore his deep knowledge very lightly and worked tirelessly to educate and support students and the university. I’ve got great memories of loading Raspberry Pi devices into his car and driving off to a conference. There is a lovely in-memorium here.

Farewell Mike, a great person taken far too soon.

The Boiler Detective

This is almost exactly how it looked

On Monday mornings our boiler stops working. How does it know? Has it been programmed to make the worst day of the week a little bit worse by making the house cold? I’ve tried asking for help with it, but once reset it seems to come back to life. The fault code is as enigmatic as the sphinx. And it is hard to mend something that isn’t broken. The worst kind of bug.

Anyhoo, I’ve figured it out. It turns out that Sunday night in our house is also “have a soak in the bath” night. The rest of the week we have speedy showers, but on Sunday a hot tub is in order. And the bathtub and the boiler share the same downpipe. When the bath is emptied the huge surge of water overwhelms the pipe and causes the to back up into the condensation drain for the boiler. The boiler doesn’t like this, and shuts down. And we wake up cold on Monday morning.

I’m going to get the plumbing looked at when the boiler is serviced. We are still going to have baths, but I’m tempted to 3D print a flow limiter to put in the plug hole so that the bath drains more slowly.

Python-Ish in The Magpi magazine

The latest Magpi + HackSpace magazine is out. It’s lovely to see that the HackSpace ethos is coming through loud and clear, with lots of making articles in there with the Raspberry Pi goodness.

One of the articles is the first in a two part series about Python-Ish, a programming language I created by accident to control Hull Pixelbot robots. I want to take some of the mystery out of how programs get to run. In this article I’m all about the low-level run time part. I think it is worth a read, but then again I am a bit biased..

You can get the magazine in shops or buy a digital copy here.

Snowed In

It even has the helecopter

They say that one of the best ways to give the gods a good laugh is to make long term plans. Well, we had made long term plans for today. These involved a trip to Harrogate, a nice meal out and a visit to, wait for it, a camera shop (and the Knitting and Stitching Show for others in the party). But then the snow came, followed by the weather warnings, followed by the traffic alerts. So we stayed home. Wah.

But we didn’t let that beat us. Turns out that you can buy Lego at Barkers, which is just a quick walk from our house. And it is right next to a lovely coffee shop. So it was out for a coffee, pick up the Lego Mars Rover that I’ve been coveting for months, and then back home to build it. It’s a lovely model with a really clever steering action. Then we went out for tea. It wasn’t the nice day we we’d planned, but it was very nice nonetheless.

Even Brokener

the black thing at the bottom is a big capacitor for the flash.

We thought we’d have a look at one of my broken Nikon cameras today. The good news is that the back came off without too much hassle (once we found the screws behind the viewfinder surround). The bad news is that the picture above shows what you see next. The service manual now says you have to unsolder some of the ribbon cables and remove the rear circuit board. We are presently summoning up the courage to do this…

Learning the Data Protection Act - and Fixing the World

I’m in the process of re-becoming a member of staff at Hull University. Things have changed a bit since I started. For one of the jobs I started back in the day the induction consisted of “Welcome to the department Rob. You’re giving the second year networking course. It starts next term”. Actually, I may be being a little unfair here. I think I did get sent on a DEC VMS system management course too.

Anyhoo, nowadays employers are much keener to make sure you know stuff. I’ve had to do seven training courses about things I thought I knew everything about but it turned out I didn’t. Today I did my Data Protection training. I knew a bit already, but what impressed me about this stuff was that people have sat down and thought about the implications of data breaches and what constitutes good behaviour by those holding data. Then they’ve made some sensible, enforceable, rules.

Now, if we can only make it illegal for companies to collect data about us when we publish things, and illegal use collected data to recommend other things, we might be on our way out of our current mess…..

I buy broken cameras so you don't have to

What do you get if you buy a camera marked as broken? You get a broken camera. What do you get if you buy a camera marked as “tested and working - just needs new batteries”? You get a broken camera. My Nikon Pronea 6s has arrived and, although it looks lovely and makes all the right noises it also fails after I’ve taken a few shots. Oh well. I really like the look of the camera, and I like the idea of using old film. And the cameras are very cheap.

But my quest for a working one is going to have to continue…

Film Developing Frenzy

Spent a very happy time developing some films today. I learned some stuff:

  • Using a tank which can develop three reels at a time is kind of a great idea, but you need to mix up a lot of chemicals.

  • It’s much easier to have multiple developing tanks so that you can develop lots of films in sequence without having to wait for the tanks and the spirals to dry out.

I took the pictures at Bridlington and Comicon.

West Yorkshire Cameras Closing

One of my highlights of a trip to Leeds was a visit to West Yorkshire Cameras. They started off in the Corn Market and then moved to a spiffy shop in the Grand Arcade. I’ve bought quite a few bits and bobs from them over the years and always been impressed by their knowledge and enthusiasm for analogue photography.

And now they are closing. You can read a detailed explanation on their website. Essentially they took a look into their crystal ball and decided that the long term omens were not great. The only tiny piece of good news is that their closing down sale looks like it will be awesome. They are applying progressively larger discounts over time, so you can buy something at a reduced price or wait for the next price drop and gamble that nobody else will make a move on it.

Tests shot with the new old camera…

I thank them for their service over the years, and I wish them all the best for the future. And yes, I did buy a camera from them - for old time’s sake….

Great Hardware Meetup : Everything working by 6:30 pm

Eveyrthing Working

We had a great Hardware Meetup last night. Not a huge number of people, but an awful lot of expertise. I took along a new ESP32 device I’d just received from China. I was planning to use it in place of the Wemos D1 Mini device that I’ve been using for ages. I was making the switch because I couldn’t find any drivers to connect a D1 Mini to my shiny new Snapdragon powered laptop. Imagine my amusement to discover that the new device I’d bought used the same CH340 usb interfaces as the D1 Mini and wouldn’t work either. Wah.

But then Ben didn’t believe me when I said that there are no CH340 USB-to-serial drivers available for my Snapdragon powered Windows 11 notebook. He did some digging and found me the manufacturer’s proper download site: https://wch-ic.com/downloads/CH341SER_EXE.html I installed the ones from this site and they worked a treat. This is a big win for me. It makes the new notebook even more perfect.

So then it was on to the project for the evening. I’ve been meaning to add a Connected Little Box which can display text messages. I bought a little LCD panel for the princely sum of 2.64 It comes with an adapter that lets you use it from I2C, which makes the wiring much simpler. I’ll do a detailed post about it later. We found the drivers, added them to my PlatformIO project and had the LCD panel working in about ten minutes. Pro tip: if you can’t see anything on the screen you should adjust the contrast.

So, half an hour before the end of the meetup I had got everything working that I’d brought with me. The next meetup is in two weeks on the 27th of November. I’ll have to bring along something more difficult next time.

In the meantime Brian and David were playing with a rotating Lidar sensor and Richard was showing off new kit and working on an old-school embedded device.

And we rounded if off with a nice meal at the Omlette. Good times.

Deploying Code to a Wemos D1 Mini with an FT232R USB-to-Serial Converter on an ARM64-Based Computer

It’s not pretty, but it works..

Update: Turns out I’m an idiot. You can get ARM drivers for the CH340 device. You just have to look in the right place:

https://wch-ic.com/downloads/CH341SER_EXE.html

This is still a good read, and you can use this technique with any device which doesn't have a USB to serial adapter. But I'm now very pleased to be able to report that my Snapdragon powered Copilot laptop is one step closer to perfection.

Sometimes we tech enthusiasts find ourselves on a slightly unconventional path — such as using an ARM64-based computer, like a Snapdragon-powered Windows PC. Here’s where things get interesting: while the Wemos D1 Mini, an ESP8266-based board, is fantastic for IoT projects, it typically comes with a CH340 USB-to-serial converter chip. And here’s the catch: as of now, CH340 doesn’t have ARM64-compatible drivers for Windows. This leaves us in a bit of a bind.

The solution? We’re using an FT232R USB-to-serial adapter as a workaround, since FTDI (the maker of the FT232R) does provide ARM64 drivers. So, we’ll connect the Wemos to our computer through the FT232R and deploy code without needing native support for the CH340. Let’s walk through how to set this up.

Step 1: Download and Install the FTDI Drivers

To start, let’s make sure we have the ARM64 drivers installed for the FT232R.

  1. Go to FTDI’s VCP Drivers page.
  2. Download the ARM64 driver under the “Windows (Desktop)” section.
  3. Install the driver, following the on-screen instructions. This driver will allow your ARM64-based computer to recognize the FT232R as a COM port.

After installation, plug in the FT232R USB-to-serial adapter, and you should see it listed as a new COM port in your device manager. With this setup, we’ve successfully created a bridge to work with the Wemos D1 Mini on ARM64 Windows.

Step 2: Connecting the FT232R to the Wemos D1 Mini

Now let’s handle the wiring. This is where we make the magic happen, letting us put the Wemos D1 Mini into programming mode without needing native CH340 support. Here’s how to connect each pin:

Required Pins

FT232R Pin Wemos D1 Mini Pin
TX RX (D10)
RX TX (D9)
GND GND
DTR D3 (GPIO0)
RTS RST

Explanation of the Connections:

  • TX (on FT232R) to RX (on Wemos) — Data is sent from the FT232R to the Wemos.
  • RX (on FT232R) to TX (on Wemos) — Data is received from the Wemos to the FT232R.
  • GND (on FT232R) to GND (on Wemos) — Both devices share a common ground.

To enter programming mode:

  • DTR (on FT232R) to D3 (GPIO0) — The DTR line pulls GPIO0 low during reset, which signals the Wemos to enter programming mode.
  • RTS (on FT232R) to RST — The RTS line pulls the RST (reset) pin low, resetting the Wemos and kicking it into programming mode when DTR is also low.

Step 3: Programming the Wemos D1 Mini

With everything wired up, it’s time to program the board. Here’s how you can do it:

  1. Using the Arduino IDE:

    • Open the Arduino IDE and select Wemos D1 Mini under Tools > Board.
    • Select the newly recognized COM port under Tools > Port.
    • Write a simple sketch, such as the Blink example, and click Upload. The Arduino IDE will handle the DTR and RTS signals automatically to put the Wemos into programming mode, so you don’t need to press any buttons.
  2. Using PlatformIO:

    • PlatformIO can be used for uploading code, but it sometimes leaves the DTR and RTS lines in a state that holds the Wemos in reset or bootloader mode, preventing it from running normally. Here’s the straightforward fix:

      Remove the DTR and RTS cables after upload.

      It’s a bit messy but reliable. Once the code upload completes, simply disconnect the DTR and RTS cables from the Wemos. This lets the board reset itself and run the uploaded code without being held in bootloader mode.

  3. Using esptool.py:

    • If you’re comfortable with the command line, use esptool.py:
      esptool.py --port COMx write_flash 0x00000 firmware.bin
      Replace COMx with your port and firmware.bin with your firmware file. This should automatically handle DTR and RTS toggling as well, but again, you may need to remove the DTR and RTS cables afterward to let the Wemos run normally.

Troubleshooting Tips

If the Wemos isn’t entering programming mode or starting correctly after upload, try these steps:

  • Check Connections: Ensure your wiring matches the table above.
  • Verify the Correct COM Port: Confirm the right COM port is selected in your software.
  • Remove the DTR/RTS Cables: After uploading, simply disconnect the DTR and RTS cables from the Wemos to prevent the board from staying in bootloader mode.

Wrap-Up

Using an FT232R USB-to-serial converter on an ARM64-based PC with a Wemos D1 Mini lets you sidestep the lack of CH340 support on ARM. Once set up, you’ll have a reliable way to deploy code to your Wemos, gaining the flexibility to use ARM64 computers for your IoT projects without limitations.

ChatGPT wrote this. But in the “style of Rob Miles”

Using the CH340 Usb serial connection with Arm 64 - Not Not

Update: Turns out I’m an idiot. You can get ARM drivers for the CH340 device. You just have to look in the right place:

https://wch-ic.com/downloads/CH341SER_EXE.html

Well, this is irritating. One of the reasons I got my fancy new Arm powered CoPilot PC was to write code for my little devices, including ones powered by the Wemos D1 Mini. The D1 Mini uses an ESP8266 connected to a CH340 usb to serial adapter chip which provides the link to a connected computer. On every other PC I’ve used (including a day of release MacBook Air with a brand new Apple M1 processor) this just worked. On my shiny new CoPilot PC, less so. Unlike Apple, who seem to have been able to get device drivers to work over their processor emulation, the Microsoft Prism emulator - which runs existing PC programs written for Intel hardware - doesn’t work for drivers.

So there is no way I can plug a D1 Mini device into my new machine and deploy code to it. I’ve tested ESP-32 boards (these are newer and probably what I should be using anyway) and they work fine. But I rather wish I’d done some due diligence before parting with cash for my new machine.

Strong advice for anyone who fancies doing embedded development with one of these Snapdragon powered platforms - make sure it can talk to the hardware you are using.

Five Pound Camera

It’s not heavy. It’s cheap. Bought a single lens reflex auto exposure camera from Nikon for the princely sum of five pounds plus delivery. And I got an extra lens too. It looks very stylish (at least for the 2000’s) and in clean condition. Only two problems. It uses film that isn’t made any more and it might not work. But it should be interesting. It arrives next week.