
Learn to write object oriented programming code for Arduino components using OPIS, create clean, readable, scalable code, build reusable libraries, and complete a traffic light project with minimal setup.
Discover why object oriented programming benefits Arduino projects by delivering clear, maintainable, and reusable code, while fitting a subset of C/C++ and leveraging widely used libraries.
Learn to build a basic Arduino project with affordable hardware, including a board, USB cable, male-to-male wires, 220-ohm resistors, and a red-yellow-green traffic light, plus Dink simulation option.
Set up the Arduino IDE across platforms, customize fonts and themes, and create a TinkerCAD account to build and simulate circuits with real hardware.
Arduino object-oriented programming project to build a traffic light system while learning energy classes, class interfaces and implementations, and how to compose multiple classes through practical, step-by-step practice.
Intuitively learn Arduino object oriented programming by rewriting the blink example and defining a pin property, then implement initialization, turn on, and turn off functionalities to control the LED.
Learn to create the first Arduino class using the class keyword, naming conventions, and a structured block with attributes and methods, enabling abstraction of pin operations from setup and loop.
Learn to add attributes in an Arduino OOP class, using private and public access modifiers to encapsulate the energy bin pin attribute.
Define a public class constructor to initialize a private pin attribute, using this->pin to distinguish between class and parameter, and support default and overloaded constructors for flexible led object creation.
Learn to add methods to the led class, including init and power on, configure the pin as output, and support a default high or low state.
Create an object from the class, initialize it with a pin via the parameterized constructor, and call its public methods to blink the LED, illustrating object oriented programming in Arduino.
Organize code by separating the interface from the implementation using a header file and a source file; create the header and implementation, then include the header in the main program.
Create a header file for the class with include guards to prevent duplication, include Arduino.h, and then include the header in the main program.
Separate the interface from the implementation by moving function definitions from the header to a new cpp file named entity.cpp, include the header, and qualify methods with the class name.
Turn a class into an Arduino library with header files and a CBB file. Export it on GitHub or Arduino and share via a sketch and libraries folder.
Design and implement an Arduino pushbutton class using object oriented programming, separating interface from implementation, creating instances, and handling pull up or down modes to report pressed state.
Learn to create a push button class header for Arduino, with private pin and state, constructors, and an init method to set the pin as input and read high or low.
Implement the PushButton class in C++, initialize the pin in the constructor, enable input pull-up, read the pin with digitalRead, and store the button state inside the class.
Define a push button object in Arduino oop, initialize its pin in setup, and print high/low reads over serial at 10 Hz.
Learn to extend a push button class for Arduino OOP to support pull-up and pull-down configurations, using internal or external resistors by adjusting constructor flags and input modes.
Add more abstraction to the push button class by implementing an is_pressed method that hides pullup or pulldown logic, updates internal state, and exposes a simple pressed interface.
Implement debounce inside the class with private attributes to track last state change time and a 50 ms delay, keeping the public interface unchanged.
Combine three entities using the energy class with one push button to blink in different ways, and initialize in setup.
Create a Blinco class that uses the energy class as an internal attribute to blink without delay, showing how to compose functionality with three entities blinking at different rates.
Create an energy blinco class on top of the energy class to blink without delay, keeping the main program unblocked.
Add a private toggle method in the blink class to flip LED state between high and low, update state and energy on/off, and initialize state to low.
Design a time-based blink class to toggle the led without delay, using last blink time and blink delay, with a default and customizable delay via constructors.
Add getters and setters to access and modify a private attribute like blink delay in an Arduino object oriented programming class, with validation to keep the delay within safe bounds.
Create three LED blinkers in an Arduino OOP project, each blinking at a different rate using three entities and three pins (red, yellow, green) with adjustable delays.
Implement a traffic light class atop existing components, using a state machine to manage yellow, green, and blinking phases triggered by a push button, with brightness control via a potentiometer.
Learn to build an Arduino OOP main program for a traffic light, wiring components, and driving a state machine with red, yellow, and green states and brightness control.
Learn to build a traffic light class in Arduino OOP by composing it from energy blinker and push button components, defining pins and a constructor for object references.
Implement init and toggle methods for the traffic light in an Arduino OOP project. Initialize all components within the traffic light class and expose red, yellow, and green controls.
Master a traffic light state machine inside a class in Arduino, implementing an update method, a switch-based state enum, and time-based transitions to cycle red, yellow, green, and blink green.
Implement a non-blocking time-based state machine for a traffic light using start times and durations to transition red, yellow, green, and blinking green, with a button trigger.
Create a potentiometer class in Arduino, encapsulating an analog read to return values 0–1023, with a header and cpp, tested in main and ready for traffic light integration.
Explore object oriented programming with the traffic light project by reworking from scratch, adding brightness controls and new states, and extending with sensors, a buzzer, and a traffic light manager.
Define a clear goal, design an architecture for Arduino with hardware entity classes and functional process classes, then start with minimal working code and iteratively test and expand.
Finish the course and continue practicing Arduino object oriented programming by improving your project, watching the project conclusion video for ideas, rewriting with clean OPIS, and creating libraries with documentation.
You want to write Arduino code that you can easily read, modify, and share with other Arduino developers?
Or you already know OOP (Object Oriented Programming) and you want to know how to apply it to Arduino?
At the end of this course you will be able to:
Write clean Arduino code with OOP for any hardware component or functionality.
Rewrite your own projects using OOP.
Create a clean and super easy-to-use OOP Arduino library.
The course works for any Arduino board.
→ Why this course?
From what I’ve seen, OOP is not frequently used with Arduino (on libraries, yes, but from most users, no).
I noticed this when I got started using the Arduino and created a few projects. My initial background was in software engineering, not electronics engineering, so I had a good foundation with OOP, applied to desktop software or web development.
When coming to the Arduino, my thought was: why not use OOP on the Arduino (since it’s possible!). I know not many people do it, but it’s going to make my programs much more scalable and easy to read.
And it worked great. Now, when I write Arduino programs, I almost always use OOP.
Seeing that there is a lack of structured resources on the Internet to learn how to write OOP code for Arduino, I decided to create this course.
I have packaged several years of my experience into this course, so you can learn the most important stuff, directly starting with the best practices, and all that in just a few hours.
→ How do I teach in this course?
Well, this Arduino OOP course is 100% project focused and 100% practical. Throughout the different sections, we are going to write a complete Arduino project, step by step.
Everything is hands-on (no copy and paste!), so you can directly practice with me on each video. For some of the sections I have also included some challenges for you, so you can practice on your own and develop parts of the project by yourself, using the previous knowledge you got.
No distracting fluff, just a step by step process, directly going to the point, and making you practice on the key points so you can then apply the knowledge to your own projects.
→ What will you learn/do?
Here’s a very quick overview of the course:
Create a first class (for an LED component)
Organize the class, separate the interface from the implementation
Your turn: write OOP code for a push button
Create a class to make an LED blink (how to use a class inside another class)
Your turn: create the final TrafficLight class with the high level logic, while using all the previous classes you’ve created
Note: this course is not an in-depth OOP course for C++, where I explain all the different possibilities and features of OOP. No, this is a practical course on how to apply OOP to Arduino code. Be reassured though, you don’t need to know OOP before taking the course, the first few lessons will help you grasp the main concepts through practice.
The course is entirely focused on programming, although we’ll use a hardware circuit with a few basic components. I’ll explain to you exactly what components you need (in a free preview lecture at the beginning), and then how to create the circuit in 10 minutes. And after this, back to the code!
On top of that, I will also teach you the process I use to write OOP code, and the best practices you can implement right now.
Now, don’t wait any longer and start this Arduino OOP journey with this course! After taking this course, you won’t believe how you could have waited so long to discover OOP with Arduino. Your programs will look much cleaner, modular, and easy to read.
Oh, and you also get a 30 days money-back guarantee if you’re not fully satisfied. So just get started now, and if I don’t deliver on what I said, please do get the refund.
See you in the course! :)
Note - This course is not for you if:
You’re a complete Arduino beginner and have never written a program before.
You’re an anti-OOP purist. Sorry, not for you!