Unit Testing for Arduino and ESP

I finally took the time to start learning how to write unit tests for Arduino/ESPs.

The first tests I wrote were for the button class. Even though I know in theory how to use it as was as time-consuming to get it started – one reasons why I delayed it quite a bit.

I used AUnit as a framework and the tests run on the devices (for now). I’ll look into abstraction with ExpoyDuino later – first steps first.
Some of my learnings: 

  • Memory is an issue on these devices (duh!). Some tests randomly did not work due to memory constraints. Took me a while to figure it out.
  • Execution speeds of the devices (ESP8266, ESP32, Uno, Nano) vary significantly. I had to increase buffer times for some devices because they were too fast at executing code, causing debounce times to be triggered.
  • After getting accustomed to it, writing the tests became quite fast. I went through the readme and wrote tests based on it.
  • A small annoyance – the execution order of tests is based on their name with AUnit – not the order found in code. So, I spent some time renaming groups and tests to have a decent order.

Next, I plan to add unit tests to the other two popular classes, ESPTelnet and ESPRotary.

The Nabaztag is alive and kicking

  |  |  |  | 

On my birthday in 2009, I bought myself one of the first IoT consumer devices – a cute electronic rabbit, called the Nabaztag.

It was brilliant – it could rotate its ears, read out messages, tell the weather and air quality forecast, play music, „sniff“ and recognize RFID tags, blink lights, and even act on voice commands. I consider the Nabaztag to be the great-grandfather of Alexa and Cortana.

continue >

No longer AFK

Hey, long time no hear. I hope you are still around and haven’t given up on me. The last two months were quite busy, so I didn’t find the time to write. Sorry for that.

But I have a long list of things I want to tell you. This post will be a short update on the things that have kept my attention.

continue >

The Crumbling Nerd Barrier of Physical Prototyping

When I tell people that I build physical prototypes (a.k.a things with knobs, displays, and wires, which demonstrate how physical user interfaces of products that are going to get built will work) they usually smile, often sadly, and say: „Yes, but that’s easy for you since you are such a nerd.“

That’s of course a grand misconception. Of me (probably) and the general situation as a whole. People still believe that extensive programming and electrical engineering skills are needed, but that is no longer true. The nerd barrier has been torn down in quite a few places.

continue >