The OOP paradigm
OOP is a powerful concept that solves several problems that you might come across when you develop Arduino programs. The most obvious one is the ability to reuse code that you have already written, without the need to copy and paste it throughout your program. Reusing code without having to duplicate it makes it much easier to maintain your code in the future. For example, if you want to make a slight change to an implementation, you only need to make the change in one place instead of having to make it in every program that uses that piece of code.
Imagine, for example, that you have a robot with dozens of LEDs that need to blink at different frequencies. Instead of implementing the same blink logic for each of the LEDs and creating a lot of redundant code, OOP lets you implement the logic only once and then reuse the same code for each LED. If you want to make a change to the way the blinking works, you only need to make it in one place, and it is automatically...