Maketober Day 2: Remote temperature monitoring

The complete system

I’d rather like to be able to monitor the temperature around the house. The heating system tells me the temperature but I’m not sure what this means when I’m sitting in the living room several feet away from the radiator. I’m also keen to test something I got a while back. It’s called a Cricket and it is tiny microcontroller that is specifically designed to do just what I want, which is read the temperature every now and then and send it onto the network. I want to have a battery powered sensor and want the batteries to last forever-ish.

Previously I’d be looking at LoRa (Low Powered Radio) devices to do this but they are a bit complicated to set up. The Cricket claims to give you LoRa style battery life with WiFi connectivity. I should be able to power it from a pair of AA batteries for a good long time. The Cricket achieves this by optimising the time that it takes to connect to the network and send a data packet. It seems to take around four seconds to do this, which is pretty impressive. It has one input for sensing data and another for triggering a transmission. It also has a real time clock which can be used to trigger updates. And there is an onboard temperature sensor which I can use to get my readings.

Once you’ve soldered (badly in my case) the battery pack to the Cricket you then have to attach it to your WiFi. This is done in the “traditional” way of WiFi devices. Hold down a button to trigger Access Point mode, browse to the WiFi hotspot that the device has just created, open up a web page there and enter your WiFi SSID and password. Then you have to configure your device to tell it what data to gather and where to send it. You might think that you’d do this on the device but no, you do it via a browser. Each Cricket has an unique ID on a label on the back. You log into the developer portal, find your device by its name and then use a web interface to configure it.

config page.png

You can configure the real time clock to wake up the sensor in time measured in hours, minutes or seconds. You can also use a digital or analogue input to wake the sensor up and make it send a reading. The reading can be sent as an HTTP Post to a web address or you can use MQTT. Things On Edge provide their own MQTT server or you can use your own. I’m going to use theirs.

The idea is that you enter your settings into the web page, press Save and then press the button on the sensor to make it connect to the server, upload a value and then check for new settings. This took a bit of fiddling for me, but eventually I made a sensor that wakes up every five minutes and sends a temperature reading.

MQTT temp.png

Above you can see the display from the MQTTBox program on the PC showing that temperature readings are being sent up to the server. Next I need a device to get those values and display them. But that’s a job for tomorrow.

Hull Makerspace Maketober

maketober.png

Hull Makerspace are having a Maketober event. I found out about it this afternoon. The idea is that you do a different make for every day the month of October. I’m going to have a go and see how far I get. I’m going to set up a GitHub repository and fill it up with the silly things that I make.

Above you can see a screenshot of today’s effort. It’s a tiny demo of a JavaScript physics engine that I’ve been meaning to play with for a while. That’s the beauty of things like this event. They force you to actually do something. You can play with the program here. It might prove the basis of a little game or two.

Read "The Thursday Murder Club"

Thursday murder club.png

Richard Osman is a very clever bloke. He’s known in the UK for various quiz shows and whatnot, but now he’s written a book. And it’s really, really good. It’s about murder and amateur sleuthing. There are dead bodies, confused coppers and clues galore. It’s a really enjoyable read. And I didn’t figure out who dunnit, despite being convinced at various points in the text that I was on the right track. If you like your sleuthing gentle and very English then you’ll love this.

Tech Roundup

These are the notes for my chat about current affairs for Radio Humberside this morning. I thought I’d do a Tech Roundup and make the notes into a blog post…..

Drone home

Amazon Drone.png

Amazon are launching a tiny home security drone that can fly round your house to check that you haven’t left the gas on. It comes in its own cute recharging stand and you can teach it the way round your house. I can think of a few problems.

  • You’ll have to leave all the doors open so that it can make its rounds.

  • You’ll have to be OK with a mega corporation being able to look around your home. Although Amazon say that they are not going to keep the recordings I can forsee a time when you get emails with titles like “Replace that ugly woodchip in your living room…..”

  • Who on earth is going to need it in a time when we aren’t really allowed to leave the house?


Console confusion

ps5 vs xbox.png

This is a brave time to be launching new games consoles but both Microsoft and Sony are in the midst of doing just that at the moment. Perhaps the calculation is that if nobody can go anywhere they are going to put a premium on having the best home entertainment possible. But they seem to be going about it in the most confusing manner possible. Sony “stealth sold” their new machine by putting making it available a while before they said it would be and Microsoft have chosen a name for their machine that is so close to that of their previous console (Xbox Series X vs Xbox One X that quite a few people seem to have bought the old machine by mistake.

The good news is that the new consoles offer graphics and sound which are astonishingly realistic and also have so much power that they will make creating truly immersive experiences much easier and cheaper for developers. It is also interesting to see how they are moving into a subscription model, Microsoft will give you a shiny new console and access to all their games for around thirty pounds a month, which sounds like a pretty good deal to me. Although I’m still spending too much time with Animal Crossing on my Nintendo Switch to get the best out of these new devices.


Fly the world with Microsoft Flight Simulator

Microsoft has done something that I think only a company with its vision and resources could. It has made a program that is genuinely revolutionary. They’ve built a Flight Simulator which is as big as the world. They’ve taken map data and aerial photographs for the whole of the globe and put it on their servers. Then they’ve added Artificial Intelligence that infers the shape of buildings from the overhead photographs and built servers that can stream this data into your computer as you fly around the planet. You can stick a pin anywhere in the world map and take off from there. The program includes pretty much every airfield on earth to land on.

The realism is astonishing. You get fantastic fluffy clouds and even rainbows. It’s a social game too. You can meet up with friends and take a spin around London, or New York, or Mont Blanc, or Chernobyl. It’s all there. Some of it is quite as you might expect though because the AI doesn’t always create the right buildings. Buckingham Palace is an office block. And at the moment Hull is missing a proper Humber Bridge (see above). You’ll also need quite a pricey PC and a fast network connection to get the best out of it. But it is going to totally change the way we regard video games. If indeed it is a game at all. There is so much detail that you some folks reckon that you almost learn to fly from the program. And I’ve been surprised how much fun it is to go flying with a bunch of friends.

One piece of great news for Hull residents is the fact that we have some of the best networking in the world, which makes heavily connected games like this really sing. In the future more and more experiences are going to be supplied over fast network connections and the KC LightStream service works a treat for this.


Among Us is so popular that they’ve cancelled the sequel

among us.png

The game Among Us has been out for a while. But recently it has been riding high on the Twitch game servers. 1.5 million simultaneous players, Developers Innersloth have been working on a sequel but they’ve now stopped because the original game is so popular that they want to spend time developing that instead. I’ve had a go at playing it, and it is well worth a look for anyone into social mayhem.


Sound Effects.png

If you’ve ever fancied having a sewage pump as a ringtone you can now live that dream. The BBC has released that, and lots of other sounds, for anyone to use. I wrote about this earlier here.

I say tomato.png you say Tomato.png

killer tomato.png

Sometimes, way back in the past, software writers set massive traps that we still fall into today. Like when someone at Microsoft wanted to make MS-DOS seem different to Unix so they used backslash “\” for filename separators rather than forward slash “/”. Or that other time, when someone else (or maybe the same person - who knows) thought it might be a wizard wheeze to make MS-DOS not care about the case of filenames so that Fred and fred were regarded as the same file.

This piece of genius still haunts us today. For example, when you put the web pages that you tested on your PC up onto GitHub and then find that they don’t work because you’ve said “tomato.png” in the code and the file is called “Tomato.png”.

Now, we’ll gloss over the stupidity that caused the file to be called “Tomato.png” in the first place - mainly because that is my stupidity. Let’s focus on how hard it is to fix. If you rename the file on your PC (which is hard enough because you can’t just rename Tomato to tomato - you have to go Tomato->temp->tomato) GitHub doesn’t see this change in filename name as a change in your project and so it won’t push the changes into the server. I could change the filename to “Tomato.png” in the program code, but all my other files start with a lower case letter and I’m loth to be inconsistent. I do have some pride left.

In the end I’ve fixed this by changing the name of the image file to “redtomato.png” which does reflect a change and also makes the game futureproof in that if I fancy adding some blue tomatoes later I now have a naming convention I can use.

If you’re not sure why I want to have tomatoes in my game take a look here. See what kind of high score you can get. My maximum so far is 740.

BBC Sound Effects free to use

Sound Effects.png

You might not believe this (alright, you’re bound to believe this) but when I was younger I used to buy sound effects records from the BBC. It was all part of a growing up process that involved a number of reel to reel tape recorders and duties as sound man for the local amateur dramatics society. It got so that I could actually recognise familiar effects when I heard them on TV and radio.

Anyhoo, if you also have an interest in sound effects (and who doesn’t) you might like to know that the BBC has just released a whole bunch of them which are free to use for fun if not profit. You can find them here.

You might be asking “When will I ever need the sound of ‘Single cylinder compressor pump operating with start and stop. (Sewage pump with belt drive)’?” but that is not really the point. There are loads of sampler based musical instruments out there looking for interesting inputs. You can have a lot of fun using sounds like these as raw materials. And they are a great way to enliven a boring Teams meeting if played at the right volume level.

They’ve actually got one of my all-time favourites in the collection….

Covid App Installed

covid.png

I’ve installed the NHS Covid App on my phone and it seems to work. Actually, it doesn’t seem to do much. After asking me for my home postcode (or at least the first few characters of it) the program seems to have lost interest in me. I think this is definitely a good thing. I was expecting to have to enter a username, think of a password that didn’t (or did) include non-alphanumeric characters and then enter my National Insurance number. None of that. Just a very simple interface with the things that you need to know.

If they’ve done the Bluetooth BLE stuff right it should have minimal effect on battery life. Looks like a good job to me. If you are lucky enough to have a phone that can support the app you really should install it and use it.

A pity that it is six months after we need it though.

Begin to Code with JavaScript is written

begin to code with JavaScript.png

It’s done! Yay! I’ve finished writing all the chapters of Begin to Code with JavaScript. I’ve been turning out a chapter every two weeks since early April. It’s been great fun and a wonderful distraction from the end of the world as we know it.

Of course the book is by no means finished. It now needs to be made right, which is what we do in the editing process. Since I’m ever the optimist though, and I’d appreciate feedback, you can read the draft version of the text here. I’m going to spend some time over the next few weeks catching up with the podcasts for the book, which you can find here.

Among Us is very annoying - and great fun

among us.png

We played Among Us for a couple of hours tonight. It was hilarious. Everyone is trying to repair a spaceship. Except one person - the imposter. The Imposter can sabotage the ship and kill crew members. When a death is discovered the remaining crew get together and try to decide who to throw out of the airlock. Get it right and the crew win. Get it wrong and the game continues until the imposter runs out of crew to kill or the crew fix the ship. Dead players return as ghosts who can float around trying to complete their original tasks.

It works on loads of platforms and the graphics and gameplay are super smooth. I only got to be the imposter twice and managed to mess up both times, but I really enjoyed the hearty debate that followed the discovery of each dead person in the other games. If you are looking for a bit of networked anarchy you should find some friends and have a go. I used the iPad version which worked OK although I’ve never been a fan of touch screens. I think the way forward is to pay for it on Steam and then use a PC. The game works across all the platforms.

Quiplash Fun

quiplash.png

Jackbox Games are great. I’ve got very fond memories of playing “You don’t know Jack” from CD way back in the day. Tonight we had a go at a bunch more JackBox games, including “QuipLash”. In Quip Lash you have to come up with quick quips which the rest of the players then vote on. My favourite of the night was when Simon was asked to write something you wouldn’t expect to find in a message in a bottle. He came up with “Please send another bottle”. Awesome stuff. We also played some Fibbage, and that was fun too.

Night Flying

The view of the runway

The view of the runway

Tonight we thought we’d fly over Mont Blanc. Which was sensible enough as people say it looks fantastic. Although doing the flight at night might have been a bit more adventurous than we’d bargained for. I find it hard enough to stay in the air under normal circumstances, but it is even harder when the invisible ground keeps coming up to say hello.

Anyhoo, we made it as far as the unlit runway that was our destination, but I was as usual unable to land successfully. Oh well, there is always next week.