Lucky Resistor
Menu
  • Home
  • Learn
    • Learn C++
    • Product Photography for Electronics
      • Required Equipment and Software
    • Soldering for Show
  • Projects
  • Libraries
  • Applications
  • Shop
  • About
    • About Me
    • Contact
    • Subscribe
  •  
Menu

Author: Lucky Resistor

Guide to Modular Firmware

Posted on 2019-07-142020-09-09 by Lucky Resistor

This article is for embedded software developers with a solid working knowledge of C or C++, but who struggle with large and complex projects. If you learn to develop embedded code, e.g. using the Arduino IDE, you find plenty of small example programs. It is helpful to get things started quickly, but as soon as…

Read more

It’s Time to Use #pragma once

Posted on 2019-07-132019-07-25 by Lucky Resistor

In my opinion, preprocessor macros and the outdated #include mechanism are one of the worst parts of the C++ language. It is not just these things are causing a lot of problems, even more, it is very time consuming to find them. This article will focus on #pragma once. In the past, I already wrote…

Read more

Write Less Code using the “auto” Keyword

Posted on 2019-07-122019-07-24 by Lucky Resistor

The auto keyword was introduced with C++11. It reduces the amount of code you have to write, reduces repetitive code and the number of required changes. Sadly, many C++ developers are not aware of how useful this keyword is. Especially embedded code can gain a lot by its usage. In this article, I try to…

Read more

Units of Measurements for Safe C++ Variables

Posted on 2019-07-112019-07-28 by Lucky Resistor

In your program code, you often deal with unitless values. You can add the units of measurements in the variable or function name, or by adding a comment, but there is still the risk you accidentally make wrong conversions. I will describe how to handle units of measurements for common time values using a custom…

Read more

Real Time Counter and Integer Overflow

Posted on 2019-07-102020-08-26 by Lucky Resistor

After writing the article about event-based firmware, I realised there are some misunderstandings how real-time counter are working and should be used. Especially there is a misconception about an imagined problem if such counter overflows. In this article, I try to explain this topic in more detail, using example code for the Arduino IDE. What…

Read more

Class or Module for Singletons?

Posted on 2019-07-092019-07-24 by Lucky Resistor

Should you use a class or a module with a namespace for a singleton interface in your firmware? I found there are many misunderstandings which lead beginners to make a wrong decision in this matter. With this article, I try to visualize these misunderstandings with simple example code for the Arduino platform. Before we start,…

Read more

Event-Based Firmware (Part 2/2)

Posted on 2019-07-092019-08-14 by Lucky Resistor

In the first part of this series, we explored the general concept of event-based firmware. To read that article, follow this link. The concepts we discussed were directly tailored to one specific firmware. Now, let’s develop those concepts further to build an event system that can be integrated into many different applications. First, we’ll look…

Read more

Event-based Firmware (Part 1/2)

Posted on 2019-07-052019-08-08 by Lucky Resistor

You start with small, simple firmware. But with each added feature, the complexity grows and grows. Soon, you need a good design in order to maintain the firmware and ensure the code remains clean and readable. In this article, I explain the event-based approach for writing firmware. I use the term “event-based” because it is…

Read more

A New Modular CMake Based Toolchain for Feather M0 HAL

Posted on 2019-06-192019-06-22 by Lucky Resistor

In the past months, I developed firmware for a few Adafruit Feather M0 based projects. The reason why I use the Adafruit Feather platform, instead of using an MCU directly, is for modularity. By using a board on sockets, it can be replaced at any later time with a more powerful one – or by…

Read more

My Personal Programming Language Recommendation Shift over Time

Posted on 2019-04-152019-04-15 by Lucky Resistor

I am developing software for 20+ years now. In the early days, I developed software in Assembler, Basic, Fortran, Pascal and C. Meanwhile my focus gradually shifted over time. It is a very personal view, with my own language recommendations I gave over time. Languages I never recommend are missing in this article, even I…

Read more
  • Previous
  • 1
  • …
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • …
  • 16
  • Next

Search this Site

Top Posts & Pages

  • Storage Boxes System for 3D Print
  • Decorative, Massive, Modular Box
  • Build a 3D Printer Enclosure
  • Free Storage Boxes Set
  • Simple Box with Lid for 3D-Print
  • Shop
  • How and Why to use Namespaces
  • Real Time Counter and Integer Overflow
  • Projects
  • Plastic Cup Meltdown - Working with Epoxy

Follow on Twitter

Follow @LuckyResistor

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 96 other subscribers

Recent Posts

  • Decorative, Massive, Modular Box

  • Let’s Print a Cat/Pet Feeding Device (Part 6)

  • How to Create a Prototype Connector from a Pin Header

  • Flawless PCB by Eurocircuits

  • Input Panel – Request for Comments

  • Let’s Print a Cat/Pet Feeding Device (Part 5)

  • Let’s Print a Cat/Pet Feeding Device (Part 4)

  • Box in 500 Sizes with Smileys

Categories

  • Build (2)
  • Common (35)
  • Fun (6)
  • How and Why (10)
  • Improve your Code (17)
  • Learn (19)
  • Projects (79)
  • Recommendations (5)
  • Request for Comments (1)
  • Review (2)
  • Software (7)
Copyright (c)2020 by Lucky Resistor. All rights reserved.
Lucky Resistor
Privacy Policy / Proudly powered by WordPress Theme: FlatMagazinews.