New Begin to Code with JavaScript Podcasts Available

Do you want to learn JavaScript the fun and painless way? Then go forward 200 years into the future when they can plug something straight into your head. For now though, you could do worse than investigate the Begin to Code with JavaScript podcasts for my new book I’ve just uploaded. They are packed with jokes, music, song, dance and misleading product descriptions.

You can get a draft of the book for free and watch screencasts where I code things live that nearly always work. Search Apple Podcasts for “begin to code with JavaScript” or listen fresh from the web at https://www.robmiles.com/jspodcast

Low Power Raspberry Pi in MagPi Magazine

magpie.png

I was digitally leafing through the latest copy of MagPi magazine when I had a sense of déjà-vu. They’ve included my HackSpace magazine article about creating Low Power clock controlled Raspberry Pi.

Quite chuffed. I’ve always fancied being in that magazine and now I am. Without even trying.

Authors note: I hope you are all really impressed by me typing “ déjà-vu” correctly. It was surprisingly hard to do.

You must read "Hello World" by Hannah Fry

If computers, big data, artificial intelligence and self-driving cars confuse you, you should read Hello World by Hannah Fry. Hannah is a proper scientist with a wonderful writing style and she makes the technology easy to understand. She also isn’t afraid to muse on the dark side of all this shiny stuff.

There is no assumed computer knowledge, everything is clearly explained and put into context and subjects are introduced with engaging real-life stories. Everything is also properly referenced so that you can follow up on things that you find especially interesting. Excellent stuff.

Teenage Engineering OP-Z as a Windows 10 sound source

I’m loving my Teenage Engineering OP-Z. Great fun. One of the things I like about it is its versatility. The usb port can be used to make it into a usb MIDI host (so that you can hang other devices off it) or a usb MIDI client (so that it can hang off other hosts) or a sound output (so it can sample sounds sent over USB) or a sound source (so that other devices can grab digital copies of the sounds the OP-Z produces).

The only problem has been that I can’t get the last option to work on my Windows 10 PC. If I want to record stuff I’ve created on the OP-Z I’ve had to send out of the OP-Z headphone socket and then re-digitise it. Which seems a bit silly for a digital device.

Anyhoo, today I was able to try the OP-Z on a non-Windows device and discovered that it worked perfectly. Knowing that something is possible is very useful if you are trying to make it happen, and so I put a bit more effort into making it work. And I managed to do it. Here’s how, if you are having the same problem:

opzsoundfail1.png

After you’ve plugged in the OP-Z, open up Device Manager on your Windows 10 PC by right clicking the Windows icon in the bottom left of your screen and selecting “Device Manager” from the menu that appears. Then open up the Sound, video and game controllers item. You can see that the OP-Z is a speaker (so we can send it sound) but not a microphone (so we can’t listen to it). Wah.

opzsoundfail2.png

No matter. We’ve got this. Type “Control Panel” in the search box on the task bar and hit enter to open the Windows 10 Control Panel.

opzsoundfail3.png

Now type “Troubleshooting” into the search window at the top right of the Control Panel and select the troubleshooting icon from the list that appears.

opzsoundfail3.png

Now click Troubleshoot Audio Recording in the middle of the page.

opzsoundfail4.png

Now click Next.

opzsoundfail5.png

Select “Synthesizer - OPZ from the menu that appears and click Next again.

opzsoundfail6.png

Windows 10 will do something magical that it should have done first time. Close the Troubleshooter and the Control Panel. Go back to your Device Manager and you should now see another input.

opzsoundfail7.png

You now have another input device that you can connect to Audacity or whatever you fancy.

Plumbing hilarity

tapfitting.png

What do you do when faced with a dripping tap? Answer, in my case, is try to fix it. No matter that it wasn’t my tap, the urge to show off my plumbing skills was too hard to resist. So, after a rummage around under the sink I found the isolator for the tap in question and, after a bit of swinging on a spanner managed to pull out the leaky bit.

At this point I was feeling somewhat smug. All we had to do was find a replacement and drop it into the tap. And then someone pointed out that all the water in the house was off.

Oops. Perhaps the isolation valve that I’d turned off did a bit more than I thought. So I put everything back together and turned the isolator back on again. And the water was still off.

Now I was more than a bit worried. My attempt to demonstrate my skills was showing something else entirely Then we discovered that, owing to a supply fault, the water was off in the entire area.

We drove off to the DIY superstore marvelling at the way circumstances collide. How a dripping tap had coincided with a water outage, both events calculated by fate to make me look like an idiot. Then the DIY superstore showed that it was a lot less than super by not having any of the replacement parts in stock. So we took our masks off and headed back.

To find that the water pressure was back to normal and the tap had stopped dripping. At least I’ve learned something, which is that some designs of tap fitting need high water pressure to force them shut. We’ve ordered some spare parts in case the problem comes back again. And I’ve discovered (but not learned just yet) that sometimes fools really do rush in where angels fear to tread…..

Fixing the width of an HTML element

fixed width ice cream sales.png

If you want to make an element input with fixed with labels you can do it by adding this to the style for the element:

.menuLabel {
display:inline-block;
width:12em;
margin: 10px;
}

The width bit sets the width of the label and the inline-block setting for display makes sure that the input field lines up properly. You can use it to make other things line up too.

Happy Birthday with Norns

norns kit.png

It’s my birthday today. Go me. I tend to sort out my own presents. Except for the chocolates of course…

I’ve fancied getting myself a Norns device from Monome for a while because I want to write some code that makes music. However, the Norns, while very pretty, is also very expensive. But now they do a Norns shield kit which you can attach to a Raspberry Pi 3 or 3+ to make the same device only cheaper. And you get to do some soldering.

I ordered a kit on Tuesday from Monome in New York. It arrived today. Amazing. Happy Birthday me. I spent a happy half hour this afternoon soldering it together. I made an image of the operating system on an SD card and fired it up. It worked. Really Happy Birthday Me.

norns.png

So far I’ve managed to make some very trippy sound loops and stuff. You can attach your browser to the device and write Lua scripts to control what it does. You can also write sound generation code using a language called SuperCollider. The Norns also has an audio input so that it can be used as an effects processor. It’s going to be a fun thing to play with.

Furby Article now in HackSpace Magazine

Furby article.png

I’ve been turning out the odd (and I do mean odd) article for HackSpace magazine recently. You can find my description of how to use an ESP32 to control a Furby toy in the latest issue here. I’ve written a little set of helper files that let you connect to a Furby toy, but you can also use the code to talk to any Bluetooth BLE device from your ESP32. You can find the code for the article on GitHub here.

I need to work on my "VR legs"

We’ve been playing some escape room type games with the Oculus Quest and the Rec Room application. They are like real escape rooms, in that a bunch of you have to figure out some puzzles to find your way to the exit. However, you do all this in a virtual environment. We’ve played a few now and the only real problem for me is that they entail lots of moving around which I don’t seem to have the stomach for.

However, if you’re made of sterner stuff they are certainly worth a look.

BMW i3 dissection

How the parking brake works

How the parking brake works

I’ve had my BMW i3 for over three years now. It’s the best car I’ve ever owned.

When I first got it other owners were talking about an amazing report that told you exactly what it was made of. Munro Associates, who specialise in this kind of thing, had taken an i3 and completely dismantled it. They took every nut, bolt, wire, microprocessor and whatnot and worked out how much each cost to make and how they fit together. It was apparently an awesome read. Only snag was that word was it cost around 100,000 dollars to get a copy of the report. That price has now dropped a bit.

For the tiny sum of ten dollars you can now obtain all 850Mb of data in the form of 10 large pdf documents. You don’t learn how to mend the car but you do get an amazing level of detail on how it was put together. For a nerd like me it is a wonderful read.

Sony TC-270 Lives

sony1.png

As part of my ongoing program of trying to distract myself from writing today I got my old reel to reel tape deck out to see if it still works. It does. I had to take the drive to pieces to lubricate some of the parts that move the idler wheels in and out of connection with the capstan flywheel, and there was a rather distracting moment when I undid something and a little spring pinged past my ear into the air. But I managed to get it going and re-live some of my musical tastes from the early 1980’s.

Fully dressed

Fully dressed

I love the way that the fact it uses “silicon transistors” is a thing worth sticking on the front. Although it does indeed use them. There are around fifteen or so inside I think… .