Cannot allocate memory – Fix for login error
Posted in

Cannot allocate memory – Fix for login error

Do you see this message on every login to your Ubuntu system? “Could not load list of meta packages: [Errno 12] Cannot allocate memory”. The error indicates there was not enough RAM available to complete the task. Here I explain where the message comes from and how to get rid of it.

Blocking vs non-blocking timers in Arduino and Particle
Posted in

Blocking vs non-blocking timers in Arduino and Particle

When coding for Arduino you may wish to run certain code once every N milliseconds. For a very simple program like blinking a LED with a 2 seconds interval using the delay() function will be sufficient. But what about multiple bits of code where each require a different interval? Using delay() they will slow each other down, significantly disrupting your program. The solution is the meassure the last time the code parts were executed.