ESP-IDF in CPP 02: Blink, our first component class

  Рет қаралды 13,417

Simon Howroyd

Simon Howroyd

Күн бұрын

Пікірлер: 29
@OckertM
@OckertM 3 жыл бұрын
0:00 Hello World! still running :D 0:42 Where we left off in video 1 2:38 app folder from video 1 changed to "application" and remember to correct it in the main CMakeLists.txt file 3:35 Create folder Gpio in the apoplication folder and Gpio.h and Gpio.cpp 5:02 Add content to Gpio.h 36:26 Add content to Gprio.cpp 1:05:50 Add CMakeLists in the Gpio folder 1:06:46 Add Gpio.h to main.h 1:08:40 Blink in main.cpp setup and loop 1:09:35 Build app 1:10:08 Error fixes 1:10:31 add Gpio component to core CMakeLists.txt 1:11:32 Gpio.h fix type gpio_pin_t changes to gpio_num_t 1:12:11 comment GpioInput class 1:13:08 reorder class values being passed 1:14:27 warnings with explanations 1:16:55 Change LODD to LOGI messages Thanks again for another amazing video! On to the next one.
@abdelrahmanyasser5720
@abdelrahmanyasser5720 11 ай бұрын
Finally, a guy in embedded systems who really cares about his code to be clean and explains the reasons. Not just blinking a LED. You are the first one i find, please recommend anyone who codes in the same way in Embedded systems if you know any.
@abdelrahmanyasser5720
@abdelrahmanyasser5720 11 ай бұрын
For a while i felt like i was just repeating my codes and the only difference is the driver module i am writing. But every thing is the same in C, so boring to be honest. No art in it.
@DrGreenGiant
@DrGreenGiant 11 ай бұрын
@@abdelrahmanyasser5720 Thank you so very much for the kind words. I know it has been a while since recording these very waffly videos so hopefully they still hold the test of time! If not, I am very close to starting a new series using IDF5 and C++20, so keep an eye out for that! Hopefully the production quality will be a little better too. As for others, I know what you mean. I find nothing modern, which is what inspired me to do this in the first place. That's a reflection of the whole industry imo. The only name I know worth watching, and I highly recommend is Michael Caisse. He's done a few embedded talks at CppCon (on youtube),
@abdelrahmanyasser5720
@abdelrahmanyasser5720 10 ай бұрын
@@DrGreenGiant Wow, waiting for it. I will be the first one watching it XD. Just please keep describing the bad way and the better way of doing things, just like you talked about getters and setters and the way you made it better, doing the bad thing (repeating code) in the video, and how to avoid it. This kind of stuff i don't find in many courses (specially in embedded field). Thanks for your recommendation, i will listen to his talks.
@maciej_sliv
@maciej_sliv 2 жыл бұрын
Ive just started watching your series. Its already awesome, vscode, cpp, some references, good pratices. That is genuinely a fresh breeze in embedded where majority are vim plain C programmers.
@DrGreenGiant
@DrGreenGiant 4 жыл бұрын
Hmm, sorry the audio goes nuts at the end. I'll have a look at OBS and see what's going on!
@devopssimon
@devopssimon 3 жыл бұрын
Thanks so much for the videos. Could you show more of the screen if you do any other videos? Not sure about anybody else, but I find it useful to see more code at one time so I can see context to the code.
@nhanNguyen-wo8fy
@nhanNguyen-wo8fy 10 ай бұрын
31:00 const reference, copy constructor 46:20 constructor inheritance. 54:00 init inheritance.
@mtmzll
@mtmzll 3 жыл бұрын
Thank you so much for sharing your videos. It's being extremely helpful for building my final project.
@sergiogarciapanos
@sergiogarciapanos 3 жыл бұрын
Thanks for these videos, I'm learning a lot!
@Noxoreos
@Noxoreos Жыл бұрын
There is actually a vscode plugin, that places text after the closing curly brackets to tell which line it belongs to and it will not be part of the codefile itself.
@DrGreenGiant
@DrGreenGiant Жыл бұрын
Ooh any idea what it's called? That would be helpful, particularly when reviewing legacy code
@Noxoreos
@Noxoreos Жыл бұрын
@@DrGreenGiant Sure, I had to look it up. It's called "Bracket Lens" by wraith13. I mainly used it on TypeScript JS and PHP before, but I just opened a C++ / PlatformIO project to make sure it works there, too. And it does.
@larslacour9375
@larslacour9375 3 жыл бұрын
Hi Simon. Thanks for sharing your videos. I learned a lot from it, especially the first two! I work as an embedded software engineer myself and program mostly in C. Here I will share my thought after using a lot of hours on your great videos. I watched and implemented them on my own machine to learn it. My motivation is that I would like to start using c++ and cmake on the ESP32 and this was a good starting point for me. Here is what I think you could improve: * Most importantly: the zoom level. I watched the video on a 19inch and implemented it on a second monitor. I think your intention is good, that it could be watched on a mobile device, but when I watch “software programming/engineering” on a mobile screen I’m mostly interested in the speech, in your type of tutorial am most interested in the content, so a zoom level with about 25 -30 lines of code on the screen would be helpful. What I did like was in the two first videos: * Your explanation, e.g. how and why to use the “[[nodiscard]]” to ensure using your own implementation correct. * Your recommendations, now I also follow the c++ weekly news. * The debugging, it is inspirational to see how others programmers/engineers debug! * Your explanations about cmake, I´m quit new here, but using your pieces of advice was helpful. * The fact that the videos build on top or the vendors SDK, this make your video to a “motorbike” compared to using the “scooter” Arduino libraries.
@sergiogarciapanos
@sergiogarciapanos 3 жыл бұрын
I agree with all, and a sample of the code will be useful for newbies like me!
@jmsiener
@jmsiener 3 жыл бұрын
@@sergiogarciapanos same!
@DrGreenGiant
@DrGreenGiant 3 жыл бұрын
Thank you so much for the really thoughtful comments. All taken on board and I hope the next video is an improvement on this. Please do keep letting me know, it really helps!
@DrGreenGiant
@DrGreenGiant 3 жыл бұрын
I have pushed up my current working branch to github. I am yet to setup git flow and do the usual git admin stuff, but the code is there at least which should help in the meantime :) github.com/howroyd/esp32_youtube_series/tree/youtube
@vincentdeman5225
@vincentdeman5225 3 жыл бұрын
thanks for explaining the esp error! youre way of explaining made it really clear. Im thinking about using it with: ESP_RETURN_ON_ERROR(x, TAG, "fail reason 1"); // err message printed if `x` is not `ESP_OK`, and then function returns with code `x`. So this way i can clearly state where the system failed.
@DrGreenGiant
@DrGreenGiant 3 жыл бұрын
Oh nice, I hadn't seen that macro. Looks very clean. Personally I'm not keen on macros in c++ but it does look a nice way of doing it
@wchen2340
@wchen2340 Жыл бұрын
@60:03 line 31 xor... return gpio_set_level(_pin,state%%_inverted_logic); ... anyway - great series. just what i was looking for.
@wessamshoman7481
@wessamshoman7481 11 ай бұрын
Thank you
@MPowerMotor
@MPowerMotor 3 жыл бұрын
Cheers for the video Simon, I'd love to learn C++ to write my own projects but unfortunately don't have enough time to learn. Do you by any chance work on side projects?
@DrGreenGiant
@DrGreenGiant 3 жыл бұрын
Yes indeed. This is very much a side project. For my actual job I work on STM32's and occasionally on an ESP32.
@MPowerMotor
@MPowerMotor 3 жыл бұрын
@@DrGreenGiant oh sweet, I’m looking for a dev to work on the firmware for my project
@DrGreenGiant
@DrGreenGiant 3 жыл бұрын
@@MPowerMotor oh ok cool. What processor are you using for the project, is it an ESP32?
@MPowerMotor
@MPowerMotor 3 жыл бұрын
Only just saw your response @@DrGreenGiant yes I’m using ESP32 😁
ESP-IDF in CPP 03: WiFi, initial thoughts and class definition
1:17:08
Getting Started with PlatformIO
51:54
DroneBot Workshop
Рет қаралды 636 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 4,9 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 101 МЛН
EDC22 Day 1 Talk 4: FreeRTOS in ESP IDF
43:01
Espressif Systems
Рет қаралды 17 М.
NVIDIA’s New AI: Stunning Voice Generator!
6:21
Two Minute Papers
Рет қаралды 98 М.
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 732 М.
Programming Is Cooked
9:30
ThePrimeTime
Рет қаралды 292 М.
Why Didn't He Get the Job? Let's Find Out! // Code Review
27:25
The Cherno
Рет қаралды 151 М.
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 653 М.
From Small To Giant 0%🍫 VS 100%🍫 #katebrush #shorts #gummy
00:19