Arduino OOP [40-Minute Crash Course]

preview_player
Показать описание
Do you want to write clean and scalable Arduino code, or create easy-to-use Arduino libraries? This Arduino OOP tutorial is just what you need to get started.

⏱️ Chapters
(00:00) Intro
(00:57) Create a Class for an LED
(03:17) Create the Led Class Structure
(05:37) Add Attributes to the Class
(08:43) The Led Class Constructor
(15:37) Add Methods to the Class
(19:43) Use your Class: Create an Led Object
(26:38) Organize the Class in a Clear Way
(29:00) Create a Header File for the Class
(34:40) Create a .cpp File - Separate the Interface from the Implementation
(40:34) How to go further with Arduino OOP?

Рекомендации по теме
Комментарии
Автор

Thank you for watching!
🔥 To go further with Arduino and OOP, check out this complete and step-by-step course

RoboticsBackEnd
Автор

Thanks for taking the time to present this information.

tseckwr
Автор

Useful. Thanks. What helps to understand classes is to treat it mentally as integrated circuits.

grzegorzkoslacz
Автор

Good basic intro to classes. Then use a real IDE and then you're really cooking!

larrybud
Автор

Thanks for this excellent tutorial! Cheers from Cologne, Germany

capitainubermorgen
Автор

Thanks for a clear explanation of the use of constructors and of "this". I wonder if an advantage of using "_" or "m_" before the variable name is that it makes it clear that it is a private variable that we are using, and we should not expect to be able to access it otherwise.

alfatech
Автор

Excellent tutorial! Both the content and the presentation! Thank you very much!

leythecg
Автор

❤Thanks a lot tutor🎉... This is exactly, what I want to learn for improvement in my carrier as Embedd Firmware developer ....! Finally, i found a treasure like channel accidentally. 😊
🎉
🎉🎉
🎉🎉🎉


Greetings

vinothn
Автор

Your videos are super clear and awesome.

anordeng
Автор

I think I must enjoy your Arduino OOP class on Udemy!

phmiii
Автор

Can you share video about Arduino and ROS2 communication?

gurselturkeri
Автор

Im also intetested in learning about using an existing library to make functions to control things, say for instance using a fastled or neopixel library to make some of my own displays and save them, im not sure how to declare libraries inside the cpp and h files. i get multiple definitions sometimes and others its not defined.

BearFulmer
Автор

What if I already have an object created, using an available library, but I need to make some additional methods for it? May I ask for hints on how to do that, please!

havehalkow
Автор

Hi, thanks for the lesson. I tried to try it but I always get the no such file or directory error. I had put the header and the cpp files in the same folder. Could you help?

dioutoroo
Автор

Should I create class for class, and another class for class creation?

janedoe
Автор

Why did you not use 'this->pin' rather than just 'pin' in the 'on' and 'off' methods?

wsmith
Автор

It's very confused.
You used 'pin' and 'pin'. Ok, you use the 'this->', but even that makes it difficult.

LuckyStriker
Автор

Ok just have to say it. So to call 3 different functions, you wrote 2 files, both of which with more lines of code than the example. All to replace 3 lines in the example. Also there is more space allocated with the object. This is the problem with "oop" and it only becomes more difficult to follow the code and takes up more space in real programs. This is bad in embedded programming. I used to be very much into oop and all that Clean Code stuff and it can be kind of good to know it in the beginning, but understanding the hardware is better in the long run if you want to make more complex things. Knowing oop clean code principals will not help you understanding why your arduino stops working because of too many spikes in your circuit, why the timing of some thing is off etc etc..

oscareriksson