Video description
Do you want to write Arduino code that you can easily read, modify, and share with other Arduino developers? Or do you already know OOP (Object-Oriented Programming) and you want to know how to apply it to Arduino? Then this course is for you.
In this course, you will learn how to create a first class (for an LED component), then organize the class, and separate the interface from the implementation. Next, it will be your turn to write OOP code for a push button. Later, you will learn how to create a class to make an LED blink (how to use a class inside another class). Finally, you will get a chance to create the final TrafficLight class with high-level logic, while using all the previous classes you have created in this course.
By 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, and create a clean and super easy-to-use OOP Arduino library.
What You Will Learn
- Package a class as an easy-to-use Arduino library
- Write a class for any Arduino component or functionality
- Create clear interfaces for other developers to use
- Learn how to use a class inside another class
- Learn naming conventions for Arduino OOP code
- Learn how to clearly organize your code in different files
Audience
This course is intended for individuals who are familiar with the fundamentals of Arduino time functionality as well as the creation of simple Arduino programs using simple hardware components.
This course can be useful for students, engineers, researchers, teachers, developers, and Arduino developers who want to produce scalable, easy-to-read code or who want to construct Arduino libraries with a clear user interface.
This course can also be helpful to those who already have a working understanding of OOP and want to learn how to use it with Arduino.
About The Author
Edouard Renard: Edouard Renard is a software engineer, entrepreneur, and robotics teacher. He really enjoys teaching new technologies to people and making complex stuff easy to understand. His method is simple and consists of only three words: step by step. Edouard knows how hard it can be to learn a new topic and just be lost in an ocean of information without knowing what to do. In his courses, he makes sure that you learn one step at a time, through practice, and that you also learn the best practices.
He is passionate about robotics and found that it’s amazing how many cool projects you can do with a robot when you have the required programming knowledge.
Table of contents
- Chapter 1 : Introduction
- Chapter 2 : Your First Arduino Class - LED
- Chapter 3 : Organize the Class in a Clear Way
- Chapter 4 : Circuit for the Course
-
Chapter 5 : Your Turn - Push Button Class
- Introduction
- Create the PushButton Class Header File - Interface
- Create the PushButton Class cpp File - Implementation
- Create a PushButton Object to Read the Button's State
- Handle Pull Up and Pull Down Resistors in the Class
- Add More Abstraction to Know When the Button Is Pressed
- Debounce the Button Inside the Class
- Combine LEDs and Buttons - Work with Multiple Objects
- Chapter 6 : LEDBlinker - Use a Class Inside Another Class
-
Chapter 7 : Your Turn - Traffic Light System
- Introduction- Final Project Overview
- The Interface and Main Program (Help to Get Started)
- Set Up the Traffic Light Class
- Add Methods to Init and Toggle Between the LEDs
- Add a State Machine Inside the Class
- Use Time Functionalities to Wait Between Different States
- Create a Class for the Potentiometer
- Modify the LED's Brightness with the Potentiometer
- Chapter 8 : Conclusion
Product information
- Title: Arduino OOP—Object-Oriented Programming
- Author(s):
- Release date: August 2022
- Publisher(s): Packt Publishing
- ISBN: 9781804614945
You might also like
book
Learning C for Arduino
Ultimate guide for programming Arduino with C Key Features Get hands-on experience with the Ardruino board …
video
Raspberry Pi and Arduino
Working only with Raspberry Pi or only with Arduino is already nice: you can do a …
book
Programming Arduino Projects with the PIC Microcontroller: A Line-by-Line Code Analysis and Complete Reference Guide for Embedded Programming in C
Now that you’ve built a few Arduino projects, and reused some pre-written sketches, it’s time to …
book
Practical Arduino Robotics
Build your hardware, electronics, and programming skills, and use them to realize your advanced robotics projects …