Posts

Showing posts from July, 2022

Seven secrets of the Raspberry Pi Pico's success

Image
The Pi Pico sold well; the Pico W has sold out several times since its launch. With two million units planned for production this year, the Pico shortage will be temporary, but it's a sign that the new Pico W is going to repeat the amazing success of the original Raspberry Pi. Pico W Why is it selling so well? What's the secret? Yesterday I jointed a group of friendly and knowledgeable enthusiasts for  an online meeting of the Melbourne MicroPython Meetup . It's not just a user group. Damien George gave a talk about the Rapsberry Pi Pico W. Damien is the creator of MicroPython, and he was responsible for the MicroPython port with Wifi support. The software was available on the day that the Pico W launched. In the discussion that followed, several of us speculated about the secret sauce that made the Pico/Pico W so successful. We concluded that there was no single factor, but that several features combined to make them so attractive. Seven key features What helped to catap...

Make your own strip-board breakout boards

Image
A useful trick for Makers In this article you'll see when you should build your own breakout boards, and you'll learn a useful trick to use when making them. Breakout boards rock Digital Makers can often make projects faster by using breakout boards. A breakout board is a small but useful module that you can use to compose your project. There are hundreds of breakout boards available. Many are based on tiny SMD chips that are tricky to solder. You can save time and reduce the risk of mistakes by buying a ready-made breakout board. Here's an Adafruit breakout board I used in the Raspberry Pi version of Lazydoro. Of course, you can only buy a ready-made board if you can find one that does what you need, If there isn't, consider making one! Why bother with self-built breakouts? Why not just put everything you need on the main project board? There are advantages to a design that uses pluggable modules. You can usually test the module on its own, and th...

Ports and Adapters - Struggling back to Beginner's Mind

Image
I have to admit it: I've been struggling over the last two days.  I'm working on a write-up of a Walking Skeleton for Lazydoro, together with sample code for its Ports and Adapters architecture. I often create a Walking Skeleton at the start of an application. Lazydoro is now in its fifth version,  there's already a finished working version, and it's difficult to 'un-know' how it evolved. Trying to create what I might have written at the start has been quite a challenge The process has been valuable, though. I think I understand  Ports and Adapters  better through working on my sample code and explanation, and it's had another benefit. I've set up an automated deployment process which I'll be able to use for future MicroPython projects. Automating deployment Some applications can be deployed as a single file, but small modules are easier to read and test. lazydoro now consists of 9 files in a three-directory tree, and deploying a new version manua...

Raspberry Pi Pico W project plans

Image
Please help me choose! The announcement of the Raspberry Pi Pico W has opened up a huge range of fun, exciting projects. Pico W in the cloud I've a long list of candidates, and I'm hoping for advice about which ones have the widest appeal. The first project is a shoo-in, not least because it's almost finished. I'll tell you about that shortly. I have seven other projects pulling for my attention, and I'll give you a quick introduction to each. Then I hope you can help me chose which to do next, or even suggest an alternative. I'll open up polls on Twitter and Facebook, but I'd also welcome feedback on this blog. Project number One If you're a regular reader of the RAREblog you will already be familiar with Lazydoro, my automated Pomodoro timer. The current version is now running well, but it's based on a Raspberry Pi Zero. I'm migrating the project to the Pico W for two reasons: I want to keep a daily log of my Pomodoros,...

Lazydoro is working again!

Image
Yesterday things looked tricky. I realised this morning that I could easily fix the problem I've been having with lazydoro and my new chair. Doh! All it took was an adjustment to the distance threshold. Lazydoro is now sitting by my keyboard and keeping a watchful eye on me. lazydoro back at work Next steps: keep a log of Pomodoros completed/broken.

Lazydoro Mk 3 - lots of automated tests for a simple design

Image
At the end of  yesterday's post lazydoro was running on a Pi zero still not working reliably. In November 2021 I worked on Ness Labs ' Write a book in 30 days challenge. I had to rely on a web-based Pomorodo timer, and thought I'd have another try at the lazydoro project. I decided to rewrite lazydoro from scratch. Lazydoro needs to do four things. It needs to know when I arrive at or leave my desk It needs to keep track of passing time It needs to know where I am in a Pomodoro cycle It needs to provide feedback to keep me on track. To make lazydoro easy to test I used a variant of the Ports and Adapters architecture. (Ports and Adapters is sometimes called Hexagonal Architecture). I first came across it in an article by Alistair Cockburn , and it made a lot of sense. It's also featured in the GOOS book: Growing Object Oriented Software Guided by Tests . Simple architecture Here's the architecture for lazydoro: At the centre is the applicat...

Lazydoro migrates to the Pi

Image
In the previous blog post I described cushadoro and its successor, lazydoro Mk 1. That was the first version of lazydoro, implementedin CircuitPython and based on the Adafruit Trinket M0. Today I'll describe the next stage of the project, a Raspberry Pi-based version. I made real progress but, as you'll see, lazydoro was still not quite good enough. Lazydoro needed unit tests At the point were we left the project the Python code had become a little complicated. I thought I ought to do more automated testing. It's possible to do that on CircuitMpython devices like the Trinket M0, but it's a lot easier if you canuse the standard Python libraries, including Python's unittest and mock frameworks. I decided to migrate the project to a Raspberry Pi. Moving to the Raspberry Pi Explorer HAT prototype At the time I migrated the project I had just fallen in love with Pimoroni's brilliant Explorer HAT pro . The HAT has loads of useful peripherals, an...

The Lazydoro story - Part 1

Image
The Lazydoro Lazydoro is potentially the most useful project I've built. I use the Pomodoro method when I am writing or coding. It keeps me focused, and makes it easy for me to maintain progress. The Pomodoro technique involves working for 25 minutes without interruption, followed by a 5-minute break away from your desk. It helps with productivity, and it's good for your health. There's just one problem. You need to remember to start a Pomodoro timer! Using a timer When I first started using the technique I tried using a web-based app to keep track of time. Sometimes I remembered to use it, but sometimes I forgot. If I was deeply absorbed in what I was doing I lost track of time and failed to take my break. After a few days of that my mood and my knees suffered! I tried building some hardware to make the Pomodoro technique easier to use. Cushadoro Cushadoro I started the project back in 2015. I called that version  cushardoro - an Adafruit trinket a...