Introduction to object-oriented programming with Arduino
- Description
- Curriculum
- FAQ
- Reviews
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.
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
-
15IntroVideo lesson
-
16Basic setting of an empty projectVideo lesson
-
17Structure of a class & data encapsulationVideo lesson
-
18Instance and constructorVideo lesson
-
19Overloading constructorVideo lesson
-
20Exercise example Interaction of header and CPP filesVideo lesson
-
21GetterVideo lesson
-
22SetterVideo lesson
-
23InheritanceVideo lesson
-
24Inherited function overloadedVideo lesson
-
25Recap Introduction OOPVideo lesson
-
26Quiz 1Quiz
-
27Wiring and series resistance calculationVideo lesson
-
28HeaderfileVideo lesson
-
29Control the LED with an objectVideo lesson
-
30Toggle LEDVideo lesson
-
31Turn LED off after x secondsVideo lesson
-
32FadingVideo lesson
-
33PulsateVideo lesson
-
34Instantiate objects in arrayVideo lesson
-
35LED chasing effectVideo lesson
-
36Quiz 2Quiz
-
37Project IntroductionVideo lesson
-
38WiringVideo lesson
-
39Create Project and ClassVideo lesson
-
40Address IR sensor individuallyVideo lesson
-
41Objects into an arrayVideo lesson
-
42Simulate Motor on offVideo lesson
-
43Evaluation of the IR sensorsVideo lesson
-
44Craft Project OverviewVideo lesson
-
45Recap OOP IRSensorsVideo lesson
-
46Quiz 3Quiz
-
47Project ideaVideo lesson
-
48WiringVideo lesson
-
49Add Class ButtonVideo lesson
-
50Debounce button with millisVideo lesson
-
51Detect duration of clicksVideo lesson
-
52Clean InterfaceVideo lesson
-
53Control LEDsVideo lesson
-
54ButtonHeadlamp inherits from ButtonVideo lesson
-
55Function Keep button pressedVideo lesson
-
56Add function FadeVideo lesson
-
57Additional task implement LED classVideo lesson
-
58Possible solutionVideo lesson
-
59Quiz 4Quiz
-
60Project ideaVideo lesson
-
61WiringVideo lesson
-
62Creating class filesVideo lesson
If you use a platform version > 3.5, it can come to errors with the library of the web server as of 05/2022.
So for this example, use the following in platform.ini
platform = [email protected]
-
63HeaderfileVideo lesson
-
64First game modeVideo lesson
-
65Game mode in loopVideo lesson
-
66Create a websiteVideo lesson
-
67Access website via ESP32 WebserverVideo lesson
-
68Transfer data from website to ESP32Video lesson
-
69Game mode on two games wonVideo lesson
-
70Sending Server Side EventsVideo lesson
-
71Prettify eventsVideo lesson
-
72Implement LED ClassVideo lesson
-
73HousingVideo lesson
External Links May Contain Affiliate Links read more