JavaScript fun and games
/if (x!=x) console.log("Wahay!");
When would the above JavaScript statement print “Wahay"?
Rob Miles on the web. Also available in Real Life (tm)
if (x!=x) console.log("Wahay!");
When would the above JavaScript statement print “Wahay"?
The start of the day was just about cool enough for me to sneak into the conservatory and record a little video about the Chocolate Synthbox. I’ve also built the GitHub repository for the project. You can find it here.
One of my biggest fans……
There’s a very popular program on the BBC called “The Repair Shop”. In it a bunch of highly skilled crafts folk mend the heirlooms of families that have fallen into disrepair (that’s the heirlooms - not the families). I felt a bit like one of the crafts folk as I surveyed the collection of fans that I’d just got down from the loft in preparation for the “Deadly Heat Wave” (tm) that is coming.
All the devices were a bit grubby. I took them to pieces, cleaned them up and put them back together. I also checked the mains plugs and re-seated the cord grip on one. At the end I had three fans that were good to go (although the bearings on one have to be heard to be believed).
Bring on the heat….
Last week we watched the new Dr. Strange multiverse movie. It was OK. We also watched Everything Everywhere all at once. It was awesome. It stars an incredibly game Michelle Yeoh and Jamie Lee Curtis.
It is all about multi-verses (like Dr Strange) but much dafter and interesting and with a beating emotional heart. Go see.
You can find the first part of Begin to Code: Building Applications and Games with the Cloud here.
I’ve rather enjoyed writing Chapter 1. I’d love to hear what you think of it.
“|t is a truth universally acknowledged that the best way to find a missing cable is to buy a replacement”.
Yesterday I lost a cable. So I bought a replacement. Today I thought I’d take a look at the original cable order. It turns out that I’d forgotten what the cable looked like, so for the last couple of days I’ve been searching for the wrong thing. A quick scan of the desktop and there it was. Oh well.
One trick to stay sane while writing a book is to fixate on something completely unimportant at the same time. One part of my brain is trying to explain JavaScript while another part is frantically trying to remember where I put the USB 2.0 Type A Female to USB B Male cable that I use to connect my Synthstrom Deluge to usb MIDI devices. I have absolutely no need to connect my Deluge to a MIDI keyboard at the moment, but that’s not the point. I’m getting regular exercise breaks too as I get up and look in places that the cable might be.
By mid afternoon I snapped and ordered an adapter which does the same job as the cable. Cost: two pounds fifty pence. Of course, now I’ll have to find something else to worry about.
The writing itself is going fine, which is the important thing.
I’ve been listening to Nerina Pallot songs ever since I heard one of the kids playing her music and copied their CD onto my computer. And now she is appearing at Cottingham Folk Festival at the end of August. If you like melodic stuff with piano and guitar plus the odd rocky number to prove that she can do that too, then you should go along, like I’m doing. There are lots of other interesting looking acts too, including Judy Collins and New Model Army.
If you’re not sure what a glossary is you can always look it up. Pause for laughter.
Anyhoo, I’ve decided to add a Glossary to my new “Begin to Code” book. Unlike earlier books, this one assumes a level of previous programming knowledge. That’s fine, but what if you know most of it but are missing a few bits and bobs? That’s where the glossary fits in. The idea is that you if you find something you’re not clear on you can drop into the glossary, read up on the thing you need help with and then head back to the text. I suppose you could try starting with no programming knowledge, read the entire glossary and then start on the text, but I’m not sure if this would end well.
I’ll be putting out some sample pages soon.
The captain looked out of the porthole at the antenna. One hundred miles wide, glinting in the distant sunlight. It had taken five years to build it in earth orbit. Then another five years to fly it to this lonely spot on the edge of the solar system. And all of it a race against time before the signal became too faint to detect. The bridge computer beeped and announced “Ten seconds to transmission”. The captain sat upright. “Those calculations had better be right” she thought to herself. It had taken the finest computers on earth to plot the trajectory of the signal on it’s 200 year journey, bouncing off planets from the transmitter to this precise location. She looked at the screen. Nothing but static so far. Then the screen cleared and displayed a familiar logo. A tune she had known since childhood blasted out of the speakers and the titles appeared. The last missing “Dad’s Army” episode had been found….
If you notice a strange looking mole while you are having a shower, make sure to have it properly checked out. At the very least, ask it why it is trying to dig a hole in your bathroom floor.
My first thought when I ordered my printed circuit boards was that I’d solder them by hand. I’ve since had a look at what this involves and changed my mind. And bought an oven. I managed to get the one above for around thirty pounds from AliExpress (search for 110/220V UYUE 946C), plus vat but with free postage. Lots of companies are now charging for delivery, which is rather annoying, but I managed to find this one, which does not. The device is mains powered and gets very hot, so I’ll give it a good checking over when it comes.
I should be able to pop some solder paste on the pcb, drop the components on top and then heat the whole board up to 200 degrees, at which point soldering magic happens. I’m quite looking forward to when it arrives. The delivery date was given as around September (such s the price of free shipping) but with a bit of luck it might be sooner than that.
If you’ve ever thought about having printed circuit boards made for your projects: you should. I sent the designs off last Friday and and today I received five boards, beautifully made and packaged. Total cost of the whole thing - less than twenty pounds. I used a firm called NextPCB. I think I’ve taken advantage of some amazing introductory offer, but even so I’d be prepared to pay quite a bit more for service as good as this.
I wish I could say that the designs that I sent off were ones that I’d created but all the nice layout and sensible ground planes are down to the efforts of Brian. However, the quality and price of the work means that I’m even more determined to learn Kicad than before.
We had a very good meetup tonight. Lots of technical talk and even some problem solving.
Richard showed off the box he had designed and laser cut at Hull MakerSpace. You never know, you might see it on a train one day.
Brian had brought along a new M5Stack device that looks awesome. It has a lovely touch display and was running a little program that showed off all the internal sensors really well.
Karen had questions about Circuit Python vs Micro Python. General consensus was that they are both jolly good. Circuit Python is easier to get started with and has lots of lovely Adafruit libraries. But it doesn’t support interrupts so programs have to poll whenever they want input. Micro Python has a few more advanced features, but is a little harder to get to grips with. You can get started with Thonny really easily for both these platforms.
I was showing off PCBs just received from a company in China. Five large boards for less than twenty pounds. Yes please. Brian used Kicad to make a really nice layout for a PCB for the Pico MIDI Cheesebox and I was in charge of sending of the files to get them made up. All we need to do now is get the surface mount parts and solder them into place. We fired up Kicad, got the part descriptions and ordered all the bits. On my super-cheap laptop.
We all took a look at the PICO W. Very nice now running on a Pico Display. A very powerful combination.
We solved a problem with aerial connectors. Female to female doesn’t work…..
We discussed the creation of 3D printed jigs for holding surface mounted devices in place for hand soldering.
I showed off my Pure Data sound generator on my super cheap laptop. But I really need to bring a proper speaker so that everyone can hear it over the noise of the laser cutter.
And there was lots of non-technical chat too
The next in-person meetup is on the 3rd of August at the Makerspace. If you’ve got tech you want to talk about, come and find us.
Just heard from Microsoft that I’m an MVP for another year, which is awesome. Thanks so much folks.
I’m never quite sure what it is that I keep doing to get the award. But I’ll just keep doing what I’m doing and hope that it works.
Our next hardware meetup is in person, at Hull MakerSpace in Hull Library. It’s on Wednesday 6th, starting at around 5:30 pm and then going on until around 7:30 pm. We’ll be showing off what we have built and talking tech. If you want to see the new Raspberry Pi PICO W (which brings WiFi to the very popular controller) we’ll have some around too. Just turn up, we’d love to see you.
Had some great fun at Cottingham Day today. The Pie Bakery (aka Hull Pie) were there so we grabbed some pies in the morning, had them for lunch and then went back out for strawberries, scones and cream. They had a bike show as well, which included this beauty. The weather forecast was fairly horrid, but the weather turned out really nice, and the huge crowds that turned out seemed to be having a whale of a time. As were we.
Did the vacuuming today while wearing noise-cancelling headphones. Managed to do an entire room with the vacuum turned off……..
My PICO W devices arrived today. They look really nice. I’ve soldered a bunch of pins onto one of them and plugged it into my PICO Display Pack with the intention of making a tiny wireless message board. Unfortunately the Pimoroni image with the drivers for the display on it doesn’t support WiFi just yet. I’ve tried using this library with the WiFi enabled Micro Python firmware but I can’t get it to work. With a bit of luck Pimoroni will catch up soon and I can make something that displays a message each time I make a new blog post….
The shiny box is the wireless antenna
The Raspberry Pi PICO is an awesome device. Super cheap, super easy to program and super easy to connect to stuff. The only thing about it that I didn’t like about it was the lack of any wireless connectivity. That’s changed now, with the launch of the PICO W. This adds a Infineon CYW43439 wireless chip to the PICO which brings Bluetooth and WiFi connectivity. The new PICO W is physically compatible with the old one. The pins are pretty much the same, although three of them (ones you don’t use much) are now accessed slightly differently.
At the moment there are no drivers for Bluetooth and you can only use the WiFi from Micro Python programs (not C++ or Circuit Python). But I expect that to change pretty quickly once folks get to grip with the device.
There’s a really good description of the new PICO W plus sample code in this month’s MagPi magazine which you can find here.
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.