04 December 2017
Oops. Missed a week. There’s a lot going on at the moment:
- I set up a first meeting with my collaborator on Gummershow. I tend to find that a day sat with an artist to confirm the brief and spec is much better than any number of phone calls. So we organised a day to sit with each other and sound out the idea. I think that’ll also lead us to discovering some unknown unknowns much faster, and hopefully lead to some new conclusions. I’m looking forward to that.
- I started writing lots of course materials for Lowick. To briefly decloak: in week 259 I’m going to be running workshops for Hyper Island’s MA in Digital Management. I’m the ‘industry lead’ for the digital technologies section of the course; over two intensive sets of campus days, we’re going to be diving deep on some ideas around digital technology practice and culture, and exploring some of the squishier, important edges of these issues, particular around cultural and ethical issues. I’m excited by the guest speakers we’ve got to challenge and provoke our students. Should be good.
- I spent my time on Selworthy working a lot with APIs: continuing to expand our inbound API, and then working on some integrations with third party systems. Great to see what was once architectural work turning into features.
- And finally, I wrapped up a phase of Longcrag collaboration work, with the largest circuit board I’ve designed to date. The firmware’s all working and the BOM’s pretty much good to go, so it’s time to share it with the community that are interested in it.
20 November 2017
Two weeks with some time off in the middle.
Selworthy is settling into a bit of a rhythm now. Reviewed some pull requests, discussed architecture, fettled some infrastructure, and found time to review how the renderer works and tweak the way we’re using FFmpeg on it. Up and down the stack like a yo-yo, but we’re seeing some sizeable features being released much more quickly.
Some prototypes arrived for new Longcrag/Foxfield products from Aisler. I’d been seeing how Aisler compared to OSHpark, who for me, are still the gold-standard for prototyping. (Mainly because: their software tooling is clear and excellent, and their turnaround times, despite posting from the US, are about the fastest I’ve found). Aisler have pretty good tooling and previews (despite a confusing checkout process) and the turnaround time was comparable to OSH. I’d hoped being in Europe it’d be a tad faster, but it worked out about the same. Still, very high quality boards.
I built up the prototypes and they worked well – in that they worked, were clear to build, and had almost no silking errors on my part. So that means I’ve got three new products to get out early next year – there’s still documentation to write, BOMs to get made up, and see if the wholesaler will take them. That also means that once some admin around them is done, I can return to the Arm prototype I was working on a few weeks ago.
On Lowick, I started conversations about the content of the course and what I’d need to get done. I also started phoning and emailing colleagues from across – and outside – the technology industry to see if I can get them involved. That seems to be going alright.
In the middle of the fortnight, I went out to Berlin for Ableton Loop. I really enjoyed Loop last year; I equivocated a little about going this year, but then remembered how it left me feeling, and that made it a no-brainer. A good few days: met some new folks – perhaps even made some new friends; went to some great sessions (especially the electro-acoustics and haptics sessions); saw some great artists perform; played a bit of music myself; and put my brain into a different context. It’s an engaging, thought-provovking event that’s well-run, and so very different to many of the contexts I’m usually in. It was thought-provoking as a designer and instrument-maker; challenging as a musician; but it was also a bit of fresh-air, warm, welcoming, open; good for my head. I can recommend going to event and conference that might be more tangential to your practice than you’re used to: with any luck, it’ll probably provoke far more new ideas than what might pass as rearranging the furniture.
06 November 2017
- I also spent a day for an existing client helping them move their site to a new webserver. They wanted to enable SSL, but it turned out it’d be easier to provision a new server than update a slightly old version of Ubuntu. So I used a bunch of Ansible provisioning tools I had on hand to build out a PHP/Apache box, talking to Amazon RDS. I probably spent longer wrangling EC2’s security groups and VPCs than I did writing provisioning code. Once moved over, there was a moderate amount of fettling to do to bring their CMS up, but it all got accomplished in the allotted time, and setting up Let’s Encrypt was a piece of cake on the new box. We moved their DNS over to Route53 to wrap up the migration work.
- I spent a little time on Wednesday tidying up some Foxfield work – sorting out BOMs for future products and finding suppliers of specific Amphenol Jacks.
- And on Thursday, I met up with Jason and Sukhvir from Curious Chip, who showed me Pip, and we had a really interesting chat about what they’re up to. Nice to talk to other inventors and designers wrangling code and hardware into product.
01 November 2017
Bullety notes for a handful of projects:
- I wrote a pitch document for Gummershow, as a way of unravelling the problems, presenting them back to the client, and making reasoned estimates. It’s given them something to think over, and has helped frame what’ll be required to pull it off.
- I said “yes” to Lowick, and started seeing what getting the ball rolling on that would be like.
- I ordered some prototypes for Longcrag/Foxfield from Aisler – I needed new protoypes for the latest round of changes, and want to see if Aisler is a viable alternative to OSHpark – they seem about as fast, cost about the same, but are based in Europe which might become an advantage.
23 October 2017
Lots of things to talk about, plus a story about debugging, because I’ve not talked much about what working looks like.
Not a lot to report from Selworthy: post-deploy, we’re beginning to work out what’s next, corralling future plans, and I think now is a good time to re-examine process. It also looks like I have a few days of sysadminning ahead of me – never my favourite task, but doing just enough to hand it off to somebody else at least means it’s a finite task.
I continued typing away at Cleeve. Only a few big projects left to write up, but there are definitely some second drafts to come.
A couple of phonecalls and meetings mean that there are two new things on the horizon and inches from actualisation. Let’s call them Gummershow (gummers-how, not gummer-show) and Lowick for now. Should have more about these next week.
And over on Longcrag, I continued hacking away at some embedded code and learning a few things on the way. Let’s talk about how that’s going.
My development setup looks like this:
At the top is the Silicon Labs development board. At the bottom is my test harness: rather than having a messy breadboard, I designed and built a simple circuitboard containing my test hardware – a button, a switch, some jack sockets and LEDs, and a pinheader to connect them all up. That can just be put straight into my breadboard as an intermediate between it and the pinouts of the development board. Much easier to work with. (Why isn’t it a ‘shield’? a) It’s cheaper – PCBs are priced by size but also b) I don’t know which pins I want to work with yet. This lets me choose and change my mind).
The code is all running on the Silabs board, and I’m able to debug it over the USB line. Proper watching of expressions and variables here – a huge quality-of-life improvement over printing strings to a serial port.
I had the code working end-to-end last week, and had been compiling it in the ‘debug’ profile. I swapped over to the ‘release’ profile to see what would happen, and the answer is: a bunch of things broke in unexpected ways. After eyeballing my code, I altered my approach to debouncing, but no dice.
I decided to stop using my eyeballs and start using the right tool for the job – so I fired up the oscilloscope. One pin in particular, which ought to light an LED for 50ms, was blinking imperceptibly. I used the scope to time it. In ‘debug’, it was blinking for 50ms; in ‘release’, it was blinking on for 390µs or so. Not what I had in mind.
I continued poking to no avail; I ended up wiring a pin into the oscilloscope and using it to debug all manner of variables. The system clock was running correctly; all the timing code was behaving correctly; evidently the error was somewhere else.
I decided to look at something else – another output that ought to toggle on button presses and would, unreliable. I discovered that it was not staying lit but bouncing, imperceptibly – a tiny square wave of pulses before it settled into a state. And the scope told me those pulses were 390µs wide.
And that was the key that cracked it.
The bounce indicated that the variables was altering, but far too fast – it was being changed in the main loop, when it really ought to have been changed in the system tick. That was a mistake – when I corrected it, things started working correctly.
The real key to understanding the problem, though, was the duration – 390µs – being exactly the same as the burst on the other LED. It turned out that in the ‘debug’ profile, when the board runs slower owing to all the other things it’s doing, the main loop was taking more than 1ms, and so the problem never emerged. In the debug profile, the main loop was taking less than 1ms – probably around 390µs, in fact – and the problem reared its head.
It took what felt like an absurd amount of time to solve this problem – about a day and a half, I reckon, over this week and the previous one. But when I solved it, I felt satisfied: I’d gone from ‘trying everything’ to real diagnosis – and debugging software on an oscilloscope. (It also reminded me about the value for the right tool for the job. Sometimes, I wonder if the scope is a bit of an indulgence – and every time it turns out to be exactly what I need, I am super grateful for it).
Embedded code, eh. I’m hitting a point with this where I think it might be time to think about building a full prototype. Erk.