Pomodoro Timer Built

Every now and then I make something that I’m really rather pleased with. I’ve just about finished the Pomodoro timer and it I like how it has turned out. You twist the knob on the right to set the time. Then you set the mode (whether you want time announcements or not) and then you press in the knob to start the clock.

If you press the big purple button the timer announces the time remaining or used, depending on how you set it up. The sound quality is OK too. The speaker packs a surprising amount of punch. With a bit of luck the project will be in the next issue of HackSpace magazine.

Fun with Breadboards

I’ve started on the hardware for my Pomodoro timer. I thought I’d build the circuit on a breadboard before I wired up the finished version in the case. I started off trying to do everything super neat. Then I discovered that some of the connections did not lend themselves to neatness, so I ended up just adding all the wires that would make it work.

I think it is called a breadboard because people look at it and go “crumbs”…….

Talking numbers

I spent a chunk of today recording myself. Something that I always find kind of frightening. My talking Pomodoro timer needs something to say, and that something will be things like “Your have twenty minutes remaining.” I’m not sure how hearing such messages will help with motivation (actually I’m fairly sure it won’t) but it is an interesting technical problem and other folks might find uses for the technique.

You could try using your skill and judgement to work out what message the above sample contains, or I could just tell you that it is “There are fifty four minutes…”.

I say Pomorodo - you say Pomodoro

I didn’t know what a Pomodoro timer was until Andrew suggest that I might like to use a Rasbperry Pi PICO to create one. On my first search I typed in Pomorodo and thanks to the magic of search correction it found the right pages. I continued calling the device Pomorodo from then on, which would have been rather embarrassing if I hadn’t just spotted it today. A Pomodoro timer is used to time tasks in a technique that you can use to improve your focus. I’m making one that will talk to you.

Head Crashing

I’m making a new device. Can you guess what it is? Today I tried to print out the top plate. I hadn’t used the 3D printer for a while and it shows its displeasure with this by ramming the print head into the bed. I think the probe in the BL touch sensor (which is how the printer knows where the bed is) had got stuck.

After a fevered few minutes resetting the print height I managed to print out a reasonable version only to discover that the big hole (which is for a big button) was way too small. Oh well. There’s always tomorrow….

Hungry DFPlayer

The DFPlayer Mini is an amazing device. Particularly as you can pick one up for around a pound on AliExpress. It will pull mp3 files off a MicroSD card (which is the most expensive part of the system) and play them for you. It outputs good quality stereo and even includes an amplifier that will drive a pair of speakers up to useful levels.

I’m using it in a device that I’m building. I’ve got a Raspberry Pi PICO triggering the audio playback over a serial connection. I loaded an MP3 file onto the SD card for testing. I used the track Fireflies from Owl City for no particular reason. The music started playing, which pleased me. Then, around 20 seconds in the drums and the bass kicked in and the whole thing crashed. Which did not please me.

It’s a power supply thing of course. I was powering it from a USB port on my PC which is a bit weak. I switched to a different port and it worked fine. There’s an important lesson here that I’ve mentioned before. If you’re making something and it starts to misbehave try a different power source.

Super strength Rob

There’s a scene in most superhero movies where the would-be hero does something while unaware of the incredible strength they now have. The results are things like baseballs going into orbit, cars flying in the air and really unpleasant handshakes.

I’ve just had that experience myself. I was taking my morning row when there was an almighty bang and the rowing machine fell into two pieces. Obviously my super-strength was the problem. I tracked it down to the above bolt which I have managed to snap after only 9 years of regular use. It seems that every rowing stroke bent the bolt slightly and eventually it failed. I wasn’t too worried about this. I’ve repaired the machine several times. I looked up the availability of bolts and found a suitable replacement. Then I took a look at the fitting it goes into on the machine. The head of the bolt had been welded into place. I’ve no idea why. It makes it impossible to for me to replace and increases the chances of the bolt failing in the first place.

So, it was onto the internet and a search for a replacement machine (I don’t want to stop rowing). I took the old one down to the tip and bid it a fond farewell. The new machine arrived this afternoon (thanks Argos). I hope it lasts as long as its predecessor.

DDD Registration open - and I'm doing a session

The bad news is that the DDD event is online so we don’t get a trip out this time. The good news is that the DDD event is online so you don’t need to make trip out. You can register here.

I’m doing a session about Pure Data and making musical instruments using the Raspberry Pi PICO. I’ll also be performing the world premier of my “Concerto in A Room” (It’s slightly smaller than a “Concerto in A Flat”) using the PICO MIDI Cheesebox and Crackers controller. Surely that’s something you mustn’t fail to miss.

Masked Fun at Comicon

They had a unicorn there.

We went to Comicon today. It was great fun. Although the Covid protection measures were laughable. Our carefully printed COVID passes were checked by someone who could apparently read QR codes by just glancing at them. Social distancing was non-existent, the place was more packed than I've ever seen it and we were pretty much the only people wearing facemasks that weren't part of a costume. It seems that "mask friendly" means that they won't throw you out if you are wearing one. Oh well. To be honest, I wasn’t expecting much more. And we still went and had a good time.

The halls at the NEC are pretty big with high ceilings. And we didn't stay in one place for very long. With a bit of luck we’ll be OK. Although I'm not convinced that hope really counts as a pandemic management solution.

Google is still broken for me

Google search is still broken for me. And a few other people too. Apparently the search team is looking into it. I just hope they can get access to their pages.

This really brings home to me the benefit of paying for services. If I was paying for a search service I’d have proper leverage with the supplier. It would be directly in their interest not to upset their customers. And I would know exactly how my service was being paid for. As it is, they seem to have made the call that giving the problem a proper level of priority isn’t worth it.

Begin to Code with JavaScript on Taskmaster

Taskmaster is a super TV program. The Taskmaster gives, er, tasks to competitors. The tasks are always interesting and the real joy of the program is watching how the competitors respond to each one.

In the show last night (season 12 episode 8) at the very end they played a game that they called “Pop Up”. Everyone sits down and then the last person to stand up before a particular event occurs (they had a pop-up toaster, jack in the box and bursting balloon) wins. It was great fun to watch.

If you want to have a go at this at home you can use a web page that I created as an example program for my book Begin to Code with JavaScript. I called it “Nerves of steel” and it works in a very similar way. The page starts a random timer. The last player to sit down before the timer expires wins. You can play it here.

If you enjoyed that you can then you can graduate to High and Low, where players try to guess whether the next random number will be higher or lower than the previous one. Guess wrong and you are out, last person in wins. You can play that here

.. and you can buy the book here:

Making lots of WiFi

I’m trying to track down the cause of my network problems at the Bonus Arena on Monday. One possibility is that a large number of available WiFi connections might cause the joining software to run out of memory.

So today I tried to make a large number of access points using a box full of ESP8266 devices. I got up to 14 access points and my software still worked fine. I think I’m going to have to go into town with a system and have a proper play to find out what is going on.

Google is ghosting me

I don’t use Google search that much. The search built into Edge does most of what I want. And for really hard stuff I use duckduckgo. But recently I don’t use Google at all. When I go to google.com I get the above error. I’ve tried it on different machines and I get the same error. I think it might be something to do with my Google account, although mail works fine, as to other Google services.

When I was at Tech Week on Tuesday I made the mistake of trying to read my Gmail on a machine I hadn’t used for a while and when I tried to sign in it offered me the chance to complete the process on a device that I didn’t have with me. Which was tricky. The process failed, I got an email telling me that someone was trying to access my account (yes! it was me!) and ever since I’ve had this problem accessing the site. I think it is having a form of digital sulk.

Fun at Tech Week Humber

Well, that was fun. Brian and I have just spent a day at the Tech Week Humber Expo. We got into place nice and early, made sure that everything worked and we knew where to get the coffee from and then settled down for the day. It was great. Lots of people asking what were doing and seeming to like it when we told them. And plenty of solid contacts to follow up after the event.

This is our Connected Little Boxes demo, showing how you can configure them to keep in touch with loved ones. We don’t want to sell these as a healthcare solution, but we think it might be fun if you got together with your kids to build one for grandad…..

Thanks to the folks at the Bonus Arena for looking after us so well (especially the packed lunches), Lucy Clark for keeping everything bowling along and finally to Hull City Council (particularly Richard) for organising things for us, getting all our mains adapters (there were a few) PAT tested so we could power up our toys and then getting our amazing stand made.

I love to see all the local expertise being showcased. It’s great to meet up with people that used to come along to my programming lectures back in the day and now find themselves running thriving companies.

Surface Go to the rescue

Our little company, Connected Humber, has got a stand at the upcoming Humber Tech Expo. I’d spent a few days prepping the devices for the demos, took them along to the Bonus Arena and plugged them in and …. they all failed.

Oh good.

The only computer I had to hand was my tiny Surface Go device. I’d brought it along because it weighs almost nothing and you never know when you might need a full fat Windows installation. I fired up Visual Studio Code, pulled down the latest release from GitHub and started investigating.

The fault was interesting. The WiFi code in the ESP8266 seems to be upset by very large numbers of available access points. It shows its displeasure by running out of memory and crashing. There wasn’t time for an elegant solution so I removed the WiFi scan, hard wired the connection details and got it working before they had even managed to get the mains connection to our stand.

I’m going to have to dig into the code later in the week and find out just what is going on. But at least I’ll have something to show off tomorrow. If I’d not thought to bring the Go along, it might have been a different story.

DDD Goes Online

Developer, developer, developer (DDD) events are one of my favourite places to meet up and talk tech. There’s one due at the end of November and the original plan was for a physical meetup. However, with Covid cases on the rise the decision has been made to make the event online. The good news is that this means that anyone can come along (the event usually fills up really quickly) and the event is not constrained by space, so there can be lots more tracks and sessions. You can sign up and take part here.

Another one bites the dust...

My loft is now officially called “The Place Where Rob’s Gadgets Go to Die”. My lovely Hitachi digital 8 camcorder is broken. It tries very hard to work. You can hear the motors struggling and then it finally gives up with an unhappy pop. I managed to make it record something but what came back were just flickering lines. I’ve got tons of old tape I was planning to import into a computer and now all I can do is look at the boxes.

I might take it to bits to try and fix it. With a bit of luck it might be something mechanical that I can mend, but I’m not that hopeful. Oh well, I suppose it is over twenty years old….

What your bugs are telling you

Last night I was doing some work on the PICO MIDI cheesebox when I found a bug in the way that note values are assembled when the box is generating random tunes. I came up with a quick fix and opened up the relevant part of the code. And then I stopped. I was wondering if, in the absence of a commercial imperative (after all, nobody’s business is hanging on this code) I should be wading in just right now. Perhaps it would be better to sleep on it and then fix it in the morning.

I put the question to Twitter, and got a variety of replies. I didn’t make it clear that the bug was not affecting anyone else at this point and so quite a few folks pointed out that in a production situation you would triage the bug (decide how important it is) and then either drop everything and fix it or roll it into the next release. Or, of course, live with it. All good stuff. But if the bug appears while you are creating a solution you have a bit of wiggle room when deciding how best to fix it. And I think you should sleep on it. As long as it won’t keep you awake…

Having left the bug and slept on it, I decided that the way the bug manifested itself reflected my poor understanding of how the program should work. To properly fix the bug I’d have to re-structure part of the code. So I did that, and the solution is much better as a result.

I’ve had this kind of experience many times. It seems that to find out how to really write a piece of code you have to write it. No amount of up-front design work shields you from this. And when you write it you must expect to have to change the structure and content of the components. I view this as a kind of battle between warring factions. As I write the code and build my understanding of what I’m trying to do I find that the objects in my solution grow and shrink. A class you think will be pivotal can shrink in importance while a “young pretender” can emerge and take over. So I don’t regard discovering bugs like this as a problem, they are part of the process. So give yourself time to deal with them properly.