TheCodersCorner.com items tagged with arduino.
While writing IoAbstraction and TcMenu, I noticed that SRAM memory usage seemed to increase at a rate greater than what seemed right by static evaluation of all the objects I had created. This will become a series of articles on the subject of efficiency in microcontroller environments. In this part, we'll look at how to evaluate memory on your device, and...
Edited 02/2026: Over the time I wrote this around 7 years ago, things have really moved on. Now many low volume IoT solutions do ship from what's effectively Arduino, or similar. I was proven right and even native chains have all moved toward simplified builds with CMake and helpful starting points. PlatformIO is heavily used and productionizes Arduino builds. CLion by...
If you've got a 7 segment display but are not sure if it is common anode or common cathode, then you need to check the polarity of the display. This is easily done with a low voltage supply (9V or less) from a battery, bench PSU or Arduino board. Firstly and before anything else, connect a 1K resistor between the common...
IoAbstraction contains a very simple collection that is relatively lightweight and works on a wide range of boards. It is a btree list that provides ordering and list storage. It works on anything from Arduino Uno upwards! It's memory usage is very configurable, and the way it resizes arrays is also configurable too. You can set the initial size if you...
Circular buffer provides an easy way to interact with events that take place on another thread or in an interrupt, it is not very efficient when used on a single thread because it uses atomic operations to ensure consistency of the buffer. It is an advanced collection for use by users that understand threading and writing interrupt safe code. There are...
An I2C LCD backpack based on the PCF8574 chip provides an easy way to get started with LiquidCrystalIO on most Arduino boards. It is usually in one of two configurations as listed below. This library works correctly with the display and even has a shorthand way of creating the LCD for this case. Connectivity combinations for i2c backpacks Pin Option1 Option2...
There are often cases when you'll need to run a micro controller from a battery power source. Unlike when running from mains power, every milli-amp matters. In these cases IoAbstraction's task manager is able to integrate easily with most low power libraries. Task manager works by repeatedly calling the function within or , during each loop task manager evaluates...
Sometimes the situation arises where a product is built (or gets close to being built), before any concerns about it's stability are discussed or proper planning arranged. Often this leads to code being written without any proper test plan in place. Combined with very tight deadlines there's often even no plan to go back and fix things up. Once this situation...
In part 2 of this series we discuss how sketches compile on Arduino, along with the cost of using the virtual keyword to create virtual classes. Some things are not quite as clear cut as may be initially thought, especially in the very low memory environment of the ATMega328 (Arduino Uno). Lastly we discuss the memory usage of Wire and how...
Measuring voltage from an analog input. Following on from the previous example ( example for driving 7 segment LED displays ). we now build on the same circuit to make a simple voltage meter. Additional requirements: Potentiometer of at least 10Kohms . In order to measure voltage, we need to use an Arduino board analog input. Usually these are marked...