2 posts tagged


Housekeeping now includes catching up with React Native updates

Prior to wedding with my lovely wife, I have created a React/Firebase family wish list, so relatives and friends could choose some gifts.

It was the most basic React to-do app that stored items on Firebase, which provided the reactivity to all clients (so in case two people visited the page at the same time, choosing the same gift was quite improbable).

At some point I decided to move adding new items to a mobile app. It was more as an experiment with React Native, rather than a security concern. So another pretty basic to-do list was created. I copied most logic over from web version, and in total created maybe 3 files. Also I only built it for Android. Didn’t really renewing Apple developer license weekly for an app that I barely use most of the time.


Fast forward 3 years, and I want to add a couple smaller features, refactor some if-conditions with router, etc.

By this time I have upgraded Android Studio on my machine, along with some of its build tools. I have very surface knowledge of mobile build pipeline and how all of the components interact. Also React Native app creator adds quite an opaque layer on top of it — I never had to configure any of those build scenarios.

So in short I created a new project with react-native CLI and copied old files over.
Thankfully my project is very small and I only had to update a couple of things in the components for it to work.

Together with this I created a Github actions workflow, so I don’t stuck with building this in future.

React Native looks much more unified for both iOS and Android now than 3 years ago, so it’s a plus.

Github Release
 No comments   2020   android   family   firebase   mobile   react   react native   tech

Toy Traffic Light with Arduino and Lego Duplo

Demoing this to my son

Here is my small project that I made for my son’s 2nd birthday.

He is very fond of trains and cars, so I thought that a working traffic light would not hurt. I know there are some commercially produced toys, but I wanted to do something myself.

If you have religious feelings about Lego, proceed with caution – some damaging images ahead.


I just looked at a 2x4 regular Duplo block and thought that its bottom tubes resembled the traffic light tubes (kind of).

Those tubes also large and deep enough to accomodate regular 5mm LEDs.

However to place the Arduino and have some space for the wiring, I had to cut almost entirely the two and a half tubes with a Dremmel rotary bit. Even after this the block still has some rigidity:


How not to solder:

Almost ready:



Project is based on Arduino Nano which fits pretty well inside the regular Duplo block.

  • Arduino Nano V3
  • Red, Green, Yellow LEDs
  • 220 Ohm resistor (3x, for the LEDs)
  • Pushbutton
  • Battery block


One can use pretty much anything to power Arduino Nano with some LEDs. I had some CR2032s, 9v crown, Li-Ion 18650 and an 3xAAA battery block lying around.

Initially I wanted to go with CR2032 in order to reduce weight and complexity, but the ones that I had did not produce enough current.

18650 is a good choice, but would require more block processing to fit the battery.

So I went with a noname 3xAAA battery pack.


I started off with a python sketch, aiming to use ESP32 with micropython to allow over-the-air traffic pattern updates.

For some reason I had issues with ESP32 on my laptop (could not properly connect over serial, even with that bespoke UART driver).

So I went really simple, with a regular Arduino and C.



Soldering is really messy, but also the space was limited:

I’m as surprised as you are with my soldering:

Some drilling had to be applied:

Complete with some hot glue:

 No comments   2020   arduino   DIY   family   hardware   lego   projects   source-code   toy