Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Arduino OOP—Object-Oriented Programming

Packt via Coursera

Overview

This course provides a deep dive into applying Object-Oriented Programming (OOP) techniques to Arduino development, allowing you to create modular, reusable, and efficient code. Starting with the fundamentals, you’ll quickly progress through designing custom classes to control LEDs and push buttons. Each lesson is designed to build your skills incrementally, from creating basic class structures to handling more complex logic, such as debouncing buttons and working with multiple objects. As you move forward, you'll learn how to organize your code by separating the class interface and implementation into header and cpp files, which not only enhances clarity but also makes your code more maintainable. By the end of this phase, you will even package your classes into an Arduino library, making your work reusable in future projects. The course culminates in the development of a traffic light system with multiple LEDs and a state machine, while introducing advanced techniques like using potentiometers to control brightness. Each project builds on the last, ensuring that by the end, you’ll have a complete understanding of how OOP can optimize your Arduino projects. Whether for personal projects or professional use, you'll leave with the confidence to apply these concepts to any embedded system. This course is ideal for Arduino enthusiasts, makers, and engineers looking to elevate their coding skills by learning Object-Oriented Programming (OOP) principles. Some familiarity with Arduino and basic programming knowledge is recommended, but no prior experience with OOP is necessary.

Syllabus

  • Introduction
    • In this module, we will introduce the overall structure of the course and its goals. You’ll gain insights into why OOP is vital for Arduino projects, explore the materials required, and configure your development environment. We’ll also provide a project overview to help you make the most out of this learning experience.
  • Your First Arduino Class - LED
    • In this module, we will begin building your first Arduino class focused on controlling an LED. You'll learn how to define the class structure, add attributes and methods, use constructors, and create objects. By the end of this section, you'll have a fully functional LED class integrated into your program.
  • Organize the Class in a Clear Way
    • In this module, we will organize the structure of your Arduino class by creating separate files for better clarity and maintainability. You'll learn to define the class interface in a header file, separate it from the implementation, and understand how to use this structure effectively. We’ll also explore how to turn your class into an Arduino library for future projects.
  • Circuit for the Course
    • In this module, we will guide you through building the circuit required for the course. You'll learn how to connect the components step by step, ensuring that everything is set up correctly for the project. This hands-on section will help you gain practical experience in circuit building and troubleshooting.
  • Your Turn - Push Button Class
    • In this module, we will guide you through creating a PushButton class from scratch. You'll define the class interface, handle button states, resistors, and debounce logic. By the end, you'll learn how to combine buttons and LEDs to work with multiple objects, further enhancing your project.
  • LEDBlinker - Use a Class Inside Another Class
    • In this module, we will explore advanced OOP concepts by embedding an LED object within the LEDBlinker class. You’ll learn how to toggle the LED state, manage blinking without delays, and use getters and setters. We’ll finish with a practical example where three LEDs blink at varying intervals, applying everything learned in this section.
  • Your Turn - Traffic Light System
    • In this module, we will guide you through building a traffic light system for the final project. You'll set up a Traffic Light class, implement a state machine, and use timing functions for transitions. Additionally, you'll learn how to use a Potentiometer to adjust LED brightness, integrating these features into a fully functional traffic light system.
  • Conclusion
    • In this module, we will wrap up the course by reviewing the project, discussing potential improvements, and covering essential best practices for using OOP in Arduino projects. Finally, we’ll provide guidance on what to explore next, helping you continue your journey in Arduino and embedded systems development.

Taught by

Packt - Course Instructors

Reviews

Start your review of Arduino OOP—Object-Oriented Programming

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.