My First Beekeeping Stream!
1:47:29
4 ай бұрын
Beeing rebellious
2:59
6 ай бұрын
SimonSays Version 2 - How To Guide
29:58
ESP-IDF in CPP: Series Update
14:42
2 жыл бұрын
ESP-IDF in CPP 14: Inter Task Messaging
1:23:42
ESP-IDF in CPP 13: WiFi Smart Config
1:07:56
Пікірлер
@DavidTLutz
@DavidTLutz 3 күн бұрын
Simon, Hope the comment finds you well. Great series, but it is a struggle using v5.3.1 for this as I have not found any way to get 'esp_efuse_mac_get_default' to compile into the project (yes, I checked all CMake REQUIRES statement) and I am using 'esp_read_mac' instead. I have been looking at the Wifi::init() method in wifi.cpp and cannot see how one would ever enter into the 'else if' block of the 'if' block as there does not seem to be any code like this: _state = state_e::ERROR. Hence, it seems that the error state would never be reported. Any clarification would be appreciated.
@DrGreenGiant
@DrGreenGiant 3 күн бұрын
_state is a member variable, not the local status variable. The whole if-else in this function is to protect against initialising twice, i.e. initialising only when _state==state_e::NOT_INITIALISED. If we are in _state==state_e::ERROR then this function returns a failed code, the underlying driver is in an error state so we cannot just retry initialisation, we would need reinitialise first, for example. Any other state means we are already initialised so the return status is OK in my schema; although this initialisation call failed, because we are already initialised, so there is no work to be done, systems are nominal so I accept this as a success and not a multi call bug. I have not played with EDF v5.3.1 so can't help here I am afraid. A very quick look at the docs shows the function hasn't been removed. I wonder if it has to be enabled in IDFConfig for the project? I am guessing though.
@DavidTLutz
@DavidTLutz 3 күн бұрын
@@DrGreenGiant I did a little more digging and found that with v5.3.1 you have to either include esp-idf/components/esp_system/include/esp_system.h in Wifi.h or add esp_system to the REQUIRES parameter of idf_component_register in application/Wifi/CMakeLists.txt and then the project would build and not error out on 'esp_efuse_mac_get_default'. Doing both also works. It was an easy fix so I am perplexed as to why I was having so much trouble before. Oh well, water under the bridge. Thanks for your reply. BTW, what version of ESP-IDF are you currently using? Is up grading something to avoid?
@DrGreenGiant
@DrGreenGiant 2 күн бұрын
@@DavidTLutz Glad you have it compiling now! Great to hear! Ive not touched an esp for 2 over years now unfortunately, new job that doesnt use them and other life things going on so not had chance as a hobby. Upgrading any major version of a toolchain component in embedded is always a big pain. Unless you have need to, that pain is obviously not worth it just for the sake of it. For a new project that needed quick time to market and needs to have high availability, I would always go with the most stable and well hardened version, which is pretty much never "latest." If I am messing about or have more time on my hands and less pressure for a reliable product then I will go with latest so I can try the new toys!
@sumankumary
@sumankumary 4 күн бұрын
Hey there, Thanks a ton for the video, hope you're feeling better now 😊. I've also been diagnosed with acromegaly (Microadenoma) and I'm scheduled for surgery in 3 weeks. A part 2 of the videos explaining more about the surgery would be super helpful. But I'm curious, how exactly did you prepare for the surgery? Did they continuously monitor your brain signals? What happens if brain fluid leaks and how do the docs manage it? And how long did it take? Also, did they have to shave your nose or head? Thanks in advance.
@DrGreenGiant
@DrGreenGiant 4 күн бұрын
Hiya. There was no prep bar blood tests, no brain signal monitoring that I was aware of. No shaving either, they went up through my nostril; there was absolutely no external evidence that I had had an operation. I had to have a dressing under my nose for a few days to catch any blood and mucous etc, which was a bit gross but not too bad. I was warned about CFS leaks and what to look out for, I forget now but iirc it was a clear watery fluid leaking from my nose. Luckily I didn't get that so I am not sure what they would do to fix it, but they seemed pretty competent if it was to occur. The surgery was about 2-3hrs I think, first thing Monday morning and I should've gone home Wednesday but they kept me in an extra 2 days because of an admin blunder, nothing to do with the surgery. To be honest, the whole thing seemed very easy and trivial, so I would have no worries at all if I had to do it again (I have had the all clear now though!) The one thing that did affect me a lot, that I believe is common, is sound. Everything seemed turned up to 11. People whispering in the next room was deafening. So if you have some ear defenders or ear plugs for the few days after surgery, that would be useful to have on standby in case you get the same. Good idea about a follow up video. I have a better webcam now too. I shall go through all the questions that have been asked in these comments and make some notes of what to cover! Best of luck, it was an absolute life changer for me.
@sumankumary
@sumankumary 4 күн бұрын
Hey, thanks a lot for taking the time to answer our questions. 🫡 I have a few more questions for you. Were there any food restrictions after the surgery? If so, how long did they last? If you're a physically active person who goes to the gym or plays sports, how long did it take before you could start doing those things again? How long do we need to monitor IGF-1 levels after surgery? Mine is currently around 800 ng/mL. Do you mind sharing what yours was before the surgery, if you remember?
@DrGreenGiant
@DrGreenGiant 4 күн бұрын
@@sumankumary You're welcome! No food restrictions except the usual no food 12hrs prior to the anaesthetic. There would be no physical restriction on exercise really but you probably won't desire to do any for at least 3 weeks. You'll be able to do very light exercise like walking after a week, but you will still have a bandage under your nose if anything like me, so might feel a bit self conscious! My IGF1 is monitored for life now, once annually by the NHS as a preventative measure. After surgery I was tested after 2-3 months, then again at 6 months then again at 12 months. I have no idea what my levels were, they may be buried in some paperwork somewhere but no idea where.
@edsonbrusque
@edsonbrusque 25 күн бұрын
Very nice. Thank you!
@vektoralexanderman4979
@vektoralexanderman4979 2 ай бұрын
Could we instead use a fixed-size buffer allocated on the stack at compile time, rather than dynamic memory allocation, to handle data in the _verify_buf function? If the data exceeds this buffer size, we could read or write it in chunks. Thanks for the great videos.
@DrGreenGiant
@DrGreenGiant 2 ай бұрын
You could indeed. That static allocation would then not be able to be used for anything else, and as you say, you would have to chunk it up for bigger buffers. If you _can't_ use heap allocs which allow the memory reuse afterwards then static would be fine. You could possibly consider doing it on the stack with small chunks too, but be wary of the FREERTOS stack size for that task. Thanks for the great comment!
@jonathankan8729
@jonathankan8729 2 ай бұрын
Thank you so much for this, I'm a full-stack web and mobile developer who somehow became the sole dev on an embedded project. This series is a life saver for me, really appreciate it.
@DrGreenGiant
@DrGreenGiant 2 ай бұрын
You're very welcome. Glad it is of some help! This might all be a bit out of date now but it should get you started. I keep meaning to do a new series but finding time is difficult these days! Ask any questions you have!
@icarossavvides2641
@icarossavvides2641 2 ай бұрын
Sorry but I found this presentation very slapdash, unstructured, inaccurate and amateurish. Also maybe install a proper video grabber instead of a camera pointing at the screen?
@DrGreenGiant
@DrGreenGiant 2 ай бұрын
@@icarossavvides2641 I'm not a professional content creator, nor do I claim to be. I don't monetise my videos. This was also my first video. Curious what you thought was "inaccurate" or "amateurish" in terms of the technical detail? I used OBS, not a camera pointing at the screen, obviously.
@itsohnoez
@itsohnoez 3 ай бұрын
I'm not sure what I hate more... your rambling, your mumbling, or your incessant amount of typos. I had to stop watching, it made me want to pluck my eyes out and cut my ears off listening to a muppet.
@Амин-т4х
@Амин-т4х 3 ай бұрын
Finally , i have been wondering about this for years
@Girlrandomer69
@Girlrandomer69 3 ай бұрын
"Science conducted" Love it
@BeeDisasters-hz5ok
@BeeDisasters-hz5ok 4 ай бұрын
Thought I cornered the disaster market.
@meermood
@meermood 4 ай бұрын
bees!! Very cool
@abdelrahmanyasser5720
@abdelrahmanyasser5720 4 ай бұрын
Lol, I also though of going to farming instead of programming XD. Never expected to follow same channels for those thoughts XD
@VeekayTV
@VeekayTV 4 ай бұрын
🐝🐝🐝
@eugenedudnyk5242
@eugenedudnyk5242 5 ай бұрын
Greetings from Odesa! Thanks for supporting my country
@Falney
@Falney 5 ай бұрын
omg your voice is extremely similar to mine. For a moment I was confused because I didn't remember recording a series on ESP32 programming.
@ethanbowering9944
@ethanbowering9944 6 ай бұрын
Thank you so much for this series, it's really fantastic. I am struggling with how I can create my own tasks though, like I want to be able to have a member function of a class run as a task. Is this the right approach? Do you have any advice?
@jcbritobr
@jcbritobr 7 ай бұрын
You ate using c instead of c++. Using a .cpp extension means nothing.
@DrGreenGiant
@DrGreenGiant 7 ай бұрын
This episode is setting up the framework to use a C++ compiler, which I do throughout. In all the episodes following this we use C++ language. File extensions are used to differentiate between C and C++ source files in the toolchain. If you wrote C++ code in a .c extended file then the toolchain would fail to compile the code with the way it's been setup by Espressif.
@Chris-ph8ow
@Chris-ph8ow 8 ай бұрын
Just stumbled on this video. Hope you are doing well now. Thanks so much for sharing your story. Currently going through tests myself. Just wondering if you are going to put out the 2nd part I would really love to hear about how the surgery was.
@DrGreenGiant
@DrGreenGiant 8 ай бұрын
I forgot to do a part two! I'll see if I can get some thoughts together to make a video but to quickly give you some thoughts now; the surgery was amazing. I recommend getting a set of ear defenders for after surgeries as myself and others I've read about became very sensitive to noise for about 2 weeks. Ear defenders made this much more comfortable. Other than that, the pain was a bit rough but mostly covered by the oxycodone I was prescribed. I was up on my feet the same day and in hospital for 4 days total. Recovery to being a useful human again was about 3 weeks. But take it easy for another couple of weeks. The change in my mood and energy levels since having the surgery have been dramatic. It made such a huge positive difference. Best of luck, ask me anything you want!
@Chris-ph8ow
@Chris-ph8ow 8 ай бұрын
@@DrGreenGiantthank you so much for your reply and for sharing your journey. This is comforting to hear. I am personally just being sent to an endocrinologist now as I noticed a protrusion in my brow and had slightly elevated igf although I don’t really seem to have any other symptoms. However I am preparing myself for what may be to come. The most scary part for me I think is the thought of the surgery. Just as another question, so like when you went for the day of the operation did you find your anxiety was manageable? What sort of pain or anxiety did you have when waking up is it like a bad headache? Did you find in the coming days you had a lot of anxiety about potential complications, CSF leak etc? Sorry for all the questions just trying to prepare myself and be as educated as possible. Thank you again so much.
@philippedunski989
@philippedunski989 9 ай бұрын
Hello, Around 45:00, you"re starting to consider the "good accessibility" in GpioBase for _pin, _cfg and _inverted_logic. IMO, a good encapsulation rule would be to always put data (and possibly function) in private accessibility , and to provide only functions in protected or public accessibility. So, you should, maybe, put those data in private accessibility and provide getter in protected accessibility, because it seems clear that "outside world" would never to have access to them (only derived classes will). I know that those three data are constant, and that compiler will not allow the derived classes -- whose may need to access to them -- to modify them values, but, putting those data in protected accessibility will -- in some way -- break the Low of Demeter, by providing to derived classes a "direct" access to those data. Putting those data in private accessibility and providing only getters on them in protected accessibility could allow you to minimalize refactoring work if you consider to represent those data in a different way in the future. You are -- of course -- completely right on the fact that it looks like unnecessary code bloat, but, as we don't know -- when writing the code now -- how many access to those data will be done in the future, it could enforce the OCP principle, by allowing you to only have to change your getters behavior if you consider "one day" to change the way those variable are represented. More interesting thing being that those getter's behavior can perfectly be inlined. In the same idea, around 1:00:00, you were stroking your mind to deal with the possibility to use inverted logic. You could avoid such "problem" by just definying some protected function to compute the final state to use according to the _inverted_logic's. We could call this function -- will say -- logic_state(bool state) -- or any more interesting name if you will -- and implement this in a way like if (inverted_logic()) // considering we have a protected getter to know what the value is return !state; return state; or, in a way like return inverted_logic() ? ! state : state; if you prefear ;-)
@nhanNguyen-wo8fy
@nhanNguyen-wo8fy 9 ай бұрын
19:00 39:00 47:00 value attr 50:00 size of type
@mynameismole
@mynameismole 10 ай бұрын
I'm not quite clear if C++ mutexes and FreeRTOS semaphores can coexist without any problem ?
@DrGreenGiant
@DrGreenGiant 10 ай бұрын
I've not had issues and last time I looked they used the same implementation. I.e. the "system calls" used by the C++ standard library were calling freertos locks. To be fair, it is a long time since I checked but I've had no reason to doubt it's changed so far.
@nhanNguyen-wo8fy
@nhanNguyen-wo8fy 10 ай бұрын
31:00 const reference, copy constructor 46:20 constructor inheritance. 54:00 init inheritance.
@abdelrahmanyasser5720
@abdelrahmanyasser5720 10 ай бұрын
I am using Nodemcu. Facing that error. error: 'time_point_now' function uses 'auto' type specifier without trailing return type [[nodiscard]] static auto time_point_now(void) noexcept note: deduced return type only available with -std=c++14 or -std=gnu++14
@DrGreenGiant
@DrGreenGiant 10 ай бұрын
Yeah I was using C++17. I presume you are on C++11 which is very old now. You will have to trail the declaration with the return type (or change auto to the actual type expected which is probably easier, or a template.) More info here: en.cppreference.com/w/cpp/language/auto
@abdelrahmanyasser5720
@abdelrahmanyasser5720 10 ай бұрын
Thx for specifying the problem. To solve it I've added target_compile_options(${COMPONENT_LIB} PUBLIC -std=gnu++17) line in the CMakeLists file in Wifi folder.
@abdelrahmanyasser5720
@abdelrahmanyasser5720 10 ай бұрын
16:47 N.I.C.E
@abdelrahmanyasser5720
@abdelrahmanyasser5720 10 ай бұрын
Really great job. Just one question and i would like to hear your opinion. I've read in a book once that it's better to include stuff only in .cpp files rather than the hearder files. So,, in your code it would be better to include in .cpp Is it right or it wouldn't actually matter ?. Thanks for that great job btw
@DrGreenGiant
@DrGreenGiant 10 ай бұрын
The answer is, it depends :) If there is something in the header that requires the include, then there is no choice. For example, a function takes a std::array as an argument, you will have to include <array> in the header if that's where the function is declared. Anything that is only used in the translation unit (cpp file in this case) can be included in either the header or the cpp and work fine. HOWEVER, if in the header, then any other translation unit that includes that header then also has all this superfluous stuff that the pre-processor has to deal with, which will inflate build times. I am very lax on this particular best practice, I admit. Simply because my build times aren't slow enough for me to care and I'm lazy. I also quite like having all my includes in one place so I can notice dependencies easier, but that preference is only enabled by having quick builds. It's not uncommon in large code bases for builds to take hours, in which case being more disciplined would have a noticeable advantage.
@eyk234
@eyk234 10 ай бұрын
Great series, just getting started with C++ in embedded. I previously only used MicroPython but C++ seems to give you much more options. Thank you very much for these videos, I was a little bit lost getting started!
@abdelrahmanyasser5720
@abdelrahmanyasser5720 10 ай бұрын
I am using Nodemcu8266 I spend a day looking for this error I spend a day looking for this error undefined reference to `pthread_cond_init' esp undefined reference to `pthread_cond_broadcast' undefined reference to `pthread_cond_wait' The answer is putting the CMakeLists as this : idf_component_register(SRCS src/main.cpp INCLUDE_DIRS "" REQUIRES freertos spi_flash pthread)
@peterwilson69
@peterwilson69 10 ай бұрын
I kind of grateful, but after 20 minutes I realized, that this is a 40min video. Does it really take 40mins of configuration to write hello world.
@DrGreenGiant
@DrGreenGiant 10 ай бұрын
Not really. If you just want to download and run the example project provided by espressif then that would be fastest, but then I'm not adding any depth or value at that point by making a video about it. This is a very old video now and my first one so the quality is poor to be honest. I'm starting a new series soon and am aiming to be much more concise and watchable.
@abdelrahmanyasser5720
@abdelrahmanyasser5720 11 ай бұрын
Best dude ever. Thank you very much <3. i was watching another series which describing ESP-IDF, and i couldn't focus on the video for 10 min. But your videos are great, your way in explaining the way of OOP is great. Thanks again, you are the best I've seen in embedded systems on youtube.
@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.
@wessamshoman7481
@wessamshoman7481 11 ай бұрын
Thank you
@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.
@nhanNguyen-wo8fy
@nhanNguyen-wo8fy Жыл бұрын
11:06 13:24 recursive mutex 15:45 send 20:52 receive 31:15 underlying pointer 34:35 QueueInterface constructor 38:20 convert pointer 40:14 copy constructor 46:40 default constructor 47:35 n_item_waiting 50:15 n_free_space 53:00 clear 54:47 create and destroy queue 1:01:00 create unique ptr to pass to Base Q Message
@LEMIZO
@LEMIZO Жыл бұрын
how can i make a !followage command? Because currently averything is broken :(
@DrGreenGiant
@DrGreenGiant Жыл бұрын
There's nothing native in Nightbot nor the TwitchAPI afaik to do this. There are some third party tools that can though. StreamElements has this integrated as a default command. Maybe this helps if you wish to do it in Nightbot though: community.nightdev.com/t/new-followage-command/35108
@LEMIZO
@LEMIZO Жыл бұрын
@@DrGreenGiant thank you. Sadly i dont really understand anything sayed on this Website :( You may could do a Tutorials it would be the only recent one on youtube for the nightbot and it proberbly will get a good amount of views ^^
@DrGreenGiant
@DrGreenGiant Жыл бұрын
@@LEMIZO Sure. What bits are you struggling with, so I have a bit of an idea what to focus on?
@LEMIZO
@LEMIZO Жыл бұрын
@@DrGreenGiant in general how to create the command with helf of this website :)
@RadimPolasek
@RadimPolasek Жыл бұрын
each your keeypress makes a sound like a drum. why? however I like your lecture.
@AlejandroVillalobos-c3p
@AlejandroVillalobos-c3p Жыл бұрын
u didn't finish smartconfig!!!! -.-
@DrGreenGiant
@DrGreenGiant Жыл бұрын
Iirc, and this was ages ago now, there was a bug in the IDF for SmartConfig which meant I couldn't complete it at the time of recording. I'm intending on starting a new series soon and SmartConfig or something equivalent will be pretty much the first thing I do to get remote development working, so hopefully that will help you! Watch this space
@PileOfPiss
@PileOfPiss Жыл бұрын
excellent project man
@wchen2340
@wchen2340 Жыл бұрын
@60:03 line 31 xor... return gpio_set_level(_pin,state%%_inverted_logic); ... anyway - great series. just what i was looking for.
@尹长平
@尹长平 Жыл бұрын
But is it really necessary to add extern "C" to the main function?
@DrGreenGiant
@DrGreenGiant Жыл бұрын
If you are going to be using C++ then yes. You will get a compile time error if you don't as the entry point of the programme will not be linked. Feel free to Google it for a better explanation of why you need it when you have both C and C++ code.