When you enroll through our links, we may earn a small commission—at no extra cost to you. This helps keep our platform free and inspires us to add more value.

Introduction to object-oriented programming with Arduino
Unlock creativity with Skillshare! Learn acrylic painting, AI writing, graphic design, and photography.

This Course Includes
skillshare
4.3 (24 reviews )
5 hours 32 minutes
english
Online - Self Paced
course
SkillShare
About Introduction to object-oriented programming with Arduino
Introduction to this course
Practical experience vs. theory
Prerequisites for this course
Disclaimer
ESP32 Pinout
VS Code vs Arduino IDE
Source Code from VS Code in Arduino IDE
Online Simulator
Enum
Struct
Basic setting of an empty project
Structure of a class & data encapsulation
Instance and constructor
Overloading constructor
Exercise example Interaction of header and CPP files
Getter
Setter
Inheritance
Inherited function overloaded
Recap Introduction OOP
Wiring and series resistance calculation
Control the LED with an object
Headerfile
Toggle LED
Turn LED off after x seconds
Fading
Pulsate
Instantiate objects in array
LED chasing effect
Wiring
Create Project and Class
Address IR sensor individually
Objects in Array
Simulate Motor on off
Evaluation of the IR sensors
Craft Project Overview
Recap OOP IRSensors
Wiring
Add Class Button
Debounce button with millis
Detect duration of clicks
Clean Interface
Control LEDs
ButtonHeadlamp inherits from Button
Function Keep button pressed
Add function Fade
Additional task implement LED class
Possible solution
Wiring
Creating class files
Headerfile
First game mode
Game mode in loop
Create a website
Access website via ESP32 Webserver
Transfer data from website to ESP32
Game mode on two games won
Sending Server Side Events
Prettify events
Implement LED Class
Create and publish your own library
Summary of the Learnings
What You Will Learn?
- Especially in the development of microcontrollers we often work with libraries, for example to control hardware components. The advantages of flexible and efficient source code design will be introduced to you in this course..
- An ESP32 is used in the entire course, but all the examples (except the last one with the Website/Webserver and WIFI), exercises and explanations can be done with any Arduino..
- Once you have completed this course, you will be able to….
- ...create your own object-oriented programs and libraries.
- ...program reusable source code.
- ... create clean source code architecture for flexible programming and adaptation.
- ... code generalized classes and provide the libraries.
- ... implement the basic concepts of OOP for your own projects and apply them immediately..
- ... save time for cumbersome programming. Because of the given conceptual design, your self-written code is easier to adapt..
- ... maintain your own code better even after a longer period of time..
- What we go through in the course:.
- Basics of object-oriented programming in the Arduino environment. We will go through the essential contents of OOP step by step. We will get right into practical examples..
- Practical example: Own LED class. Many different functions and interfaces..
- Practical example 2: Galton board with marble elevator and evaluation of 12 IR sensors..
- Practical example 3: Headlamp with only one(!) button, two LEDs and three light modes..
- Practical example: Rock, paper, scissors game. We develop this small game. We compete against the bot and play to win two games. The logic is triggered by a web server on the ESP32 (with server side events)..
- My approach in the course:.
- None (ok, only very few) slides/Powerpoints. We start in the basics immediately with a practical example. Also the theory can be tested immediately on the Arduino with the Serial Monitor and thus immediately better understood..
- The practical projects are developed together in step-by-step instructions..
- Together means in this context that I demonstrate the code, depending on the task, and you can follow me along with the source code..
- All codes are available for download on the platform, so you can get to the result without frustration..
- No rambling explanations or theory monologues, we get right to work in the basics chapter..
- All Sketches/Files from this course are attached in the Project section..
- Benefit from my years of experience and get the key skills in microcontroller development..
- I'm looking forward to see you in class.
- Markus Edenhauser.