Links Awakening looks good
/Number one son has spent a big chunk of the day playing Zelda - Link’s awkening on his Switch. As well he might, it is very good.
Rob Miles on the web. Also available in Real Life (tm)
Number one son has spent a big chunk of the day playing Zelda - Link’s awkening on his Switch. As well he might, it is very good.
Yesterday I went to a wedding and found a bolt in my trouser pocket. Very strange. Today I remembered why. The last time I wore my suit was at a Humber Care Tech Challenge communications event near the Humber Bridge. Because it was supposed to be posh the suit came out. Then, on the way back I stopped off to buy some bolts for holding air quality sensors to lamp posts. The one in my pocket was the pattern that I took along to make sure that I get ones that match.
Went to a wedding today. Put my suit on for the first time in a while and found the bolt above in my trouser pocket. I’ve no idea why it is there, or what it is for. Strange.
Anyhoo, it was a great wedding and the best of luck to Nina and Sam.
I’ve had a soft spot for the m5stack devices ever since I found them on AliExpress a while ago. They are really well packaged ESP32 based devices with high standards of production and design and a wealth of different add-ons and configurations. I’m on their mailing list and every week they seem to put out something interesting, whether it is a butterfly launcher or a fingerprint sensor. Their prices are at pocket money level for the most part and you can program their devices using Arduino C++, Python or a rather neat system called UIFlow which is block based but actually ends up being Python code.
This is the M5STack unit playing a game of scissors, paper, rock. It’s called an M5Stack because the base unit is 5cm in size. The stack bit is there because units and interfaces can be stacked together.
The M5Stack bit is the unit at the top with the LCD panel and three buttons. This unit is fitted into an M5Stack Faces unit which provides exchangeable face plates. The one shown is the keyboard, but there is also a calculator keyboard and a Gameboy faceplate too which comes into its own when you load up the NES emulator and play some games.
This is the M5Stick. It is even smaller than the stack and has a tiny colour LCD screen (which is presently showing Flappy Bird in play. It has fewer interfaces (although I’ve managed to connect an environmental sensor to it) and just one proper button to press.
Up until now if you wanted some M5Stack goodness you had to buy them from AliExpress, wait for them to arrive and sometimes pay import duty and VAT and sometimes not.
But this week I received an email from Cool Components telling me that they were now stocking M5 products. They are a bit more expensive than buying the devices directly from China, but they do arrive next day and you don’t get any nasty surprises with the price.
If you’re looking for a pleasing device with a lot of flexibility you should take a look at these.
Only a few days after completing the design for our business logo we now have 250 versions…..
If you ever meet up with me I’d be happy to give you a card.
Most computers, particularly tiny embedded ones, have a single processor core. This means that they can do just one thing at a time. If you want a computer like this to appear to perform multiple actions at the same time it must execute a tiny “slice” of each action in turn to give the illusion of parallel activity.
However, the ESP32 has two processor cores, which means that it can run two “threads” of execution in the same program code. This has suddenly become very interesting to me, as I don’t want the LEDS to flicker when the computer controlling them has to go off and talk to the network.
It turns out that running tasks on different processors in the ESP32 is actually pretty easy. I used this guide here to get started. Then I slightly changed my program so that the code that drives the leds runs on one thread and the code that talks to the network runs on another.
It just worked. I was amazed. And there was no flicker on the display. One core in ESP32 is continuously running a function that redraws the display and the other core is waiting for network messages.
If you’re wondering how it all works, and whether you can get your hands on the code, I’m going to write a howto and put the whole thing on GitHub really soon.
Well, I’ve got the PAX display working now. The display only blips slightly when a WiFi message arrives and the MQTT message in it is decoded.
I really like the way that I can push out a message from one device and have the number on the screen update.
Next stop is to try and completely get rid of the flicker by using the two processor cores in the ESP32.
We went to Cottingham Food Fair there. As did lots of other people. There was some fantastic food on offer. And we found the most amazing slices of Bakewell tart. That’s what I call a proper serving, although I only ate one.
Rather than write any more display driver stuff I went to York and bought a jacket. Yes, I’m surprised too.
I’ve actually got my display showing text now. This turned out to be a bit more difficult than I expected. Drawing text was easy, there’s a built in 6x9 font. But of course I wanted a bigger one, so I scaled the text to double size. Then I discovered that, because there are now two pixels between each character, the text wouldn’t fit on the screen. So I rewrote the display code to place each character individually and draw them only one pixel apart. Then I noticed that the redraw was a bit slow and made the display flicker. So I improved the driver to only draw changed characters rather than the entire text. And then I found that characters redrawn in the middle of a line overwrote a part of the characters next to them because they were now one pixel closer than they should have been. So I modified my draw function to redraw all the characters “downstream” of an updated character and put back the missing bits.
And now it works.
And I have another problem. The display is not “fire and forget”. It works because the computer controlling it is continuously clocking the red, green and blue data to turn on each pixel in turn. This means that when the ESP 32 goes off to read the WiFi and get the message to be displayed the whole display falls apart and, if I’m really unlucky, the whole thing crashes.
Oh well. I’ll leave that for tomorrow.
This morning I was seized with a desire to make an indicator for the PAX counter device that I’ve been playing with. The counter sends the number of WiFi and Bluetooth devices that it has seen in the last minute up to The Things Network via Lora and I fancied making something that displayed that number.
A while back I had a play with a LED panel that looks rather nice. In fact I’ve got one stuck on my wall and I bought a few more at the time. So I got one out of the garage and set about getting it to work.
Last time I used a Teensy device but this time I thought I’d use one of the dirt cheap ESP32 devices that I’ve bought a few of. The hardware of the panels is actually quite simple. There are connections for red, green and blue (RGB) pixels and you just shift the pattern for row of pixels into these connections. There are four address bits you can use to select which of 16 rows you wish to control, and there are two RGB inputs, so you can drive two rows at the same time.
I used the library here to drive the panels from my ESP32. The panels are designed to be daisy chained so that you can send a row of pixels that spans a number of them. The library uses this to good effect by linking the outputs back to inputs so that all the colours can be regarded as one great big shift register. This reduces the number of pins that you need to allocate to drive the display, at the expense of a bit more wiring.
I’ve used what I call a “spatchcock” assembly method. Because the ESP32 is supplied with soldered pins I’ve had to solder onto these pins and then flatten them so that the device will fit inside the picture frame.
I’ve got it displaying pictures. Tomorrow I’ll try drawing some text.
We’ve been having problems with my Air Quality sensor code not recognising a sensor properly. It’s the worst kind of problem; where mine works but the other one doesn’t.
Today we found out that the problem was that the supplier had sent a different model of sensor device. The good news is that I’ve not got a lot of extra diagnostic code in my driver that can probably notice this next time, or at least make it easier to discover. It all goes back to one of the irrefutable truths of debugging:
If what is happening is impossible it is either not impossible, or not happening.
This might surprise you, but I’m now a director of a company. We’ve set up Connected Humber CIC as a way of formalising things that we have previously been doing just for fun. Expect to hear more about this going forwards.
Of course a company needs a logo. So I’ve been playing with Inkscape,. The word on the street is that the word on the street needs to be in vector format so that you can draw it on the side of a building if required (although I think this will probably not ever be needed). If you use pixels for a design you can only make the image bigger by making the pixels bigger and that just ends up looking poor.
So I’ve been learning about SVG (Scaleable Vector Graphics) and getting my head around yet another user interface. Inkscape isn’t too bad to use, and after a bit of fiddling I’ve come up with the above. I could give you lots of artistic rationale for the design, you could say it represents the sun of technology rising above a seascape. However, I just did it this way because I think it looks nice.
Every now and then I go back to my Zookeeper game and try to improve my score. Today I got this. I’m way more proud of this than I should be.
..as seen on TV
Dyrham Park (pronounced “Durham Park”) is presently on the TV screen as one of the locations for the ITV production of Sanditon, a fairly speculative visualisation of an unfinished Jane Austen story. Apparently the "original” story ran out about half way through the first episode. There are 7 more episodes after that and so I think they should have probably added “from an idea by…” to the author credits.
Nevertheless, to my untrained eyes the plot and characters look pretty similar to “proper” versions of Jane Austen texts and we are happily trying to work out which characters are good and which bad and which chap the heroine will end up with. It seems to be boiling down to the “worthy” one or the “smouldering” one at the moment. My bet is on the bloke with the smoke coming out of his ears. Bad news for worthy folk everywhere.
Anyhoo, we didn’t really go to Dyrham Park purely on the strength of a TV tie in, we just fancied a day out in a nice place. In this respect it delivered really well. The location is lovely, the house fascinating, the views awesome, the food in the cafe tasty and we had a thoroughly nice time.
Fun with a fish eye….
If you’re in the area you should go and take a look. Whether or not you’ve seen in on the TV.
Astral Chain for the Nintendo Switch looks like a very good game. I can say this with confidence because today I spent a good chunk of time watching number one son play it.
There’s a nice mix of fighting, exploring, problem solving and interacting with people. Along with a nicely mind-bending premise. Amazing that such a rich environment can fit into a tiny card that then goes into handheld that you can carry around and play on the bus.
Starbucks are selling gingerbread people in the shape of tiny baristas. I wonder how the people selling them feel?
“Here’s a little model of me. Feel free to eat it…”
Well, that was fun. Some very good (and rather moving) descriptions of the problems posed by dementia and how technology can make a difference. And then we all sat down and transferred our thoughts and ideas onto a whole bunch of cards.
Lots of lovely ideas…
Getting ready for the Humber Care Tech Challenge Visioning Day. We’ve got lots of people coming and they’re all very keen to take part.
So no pressure then…..
Dot matrix printers eh? You leave them standing for a year and then when you go to use them again they don’t work.
In retrospect this was a bit silly. And my joy in finding that I could get complete set of inkjet cartridges for a fiver may have been misplaced as they might have gummed everything up. I’ve narrowed the fault down to the print head or something else. A replacement print head (which may or may not fix the problem) can be obtained for around twenty five quid. So the question is: do I spend the money on a new print head or do I throw the printer away?
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.