EP2 - How to Program Arduino - Multitasking Made Easy! (Scheduling Method)

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2025

ความคิดเห็น • 30

  • @fench1234567
    @fench1234567 ปีที่แล้ว +1

    The led's seem to stay on for random lengths of time waiting for updates.

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว +1

      (The original response I gave here is wrong, please see the following 2 comments for the correction) Do you mean in my video or in your own testing? If you mean in my video, I can assure you that the LED pulse duration and frequency are stable. But I have purposely selected a different frequency and duration to show how they are operating on an independant schedules, possibly thats why you think it seems random? Also, there possibly are ponts in the video where and edit may affect the timing seen. Rest assured, used correctly, this scheduling mechanisms can be more than accurate enough for most applications, and is able to keep functions in lock step if that what you need to do.

    • @wildfox1994
      @wildfox1994 10 หลายเดือนก่อน

      @@ForOurGood I think he's talking about the blue led turning off when red led is turning on like in 19:31. And it's happening like every two blue led blinks. But I think what is happening here is that the red and blue diodes anodes are touching and when red diode is turned on it "bypasses" blue diode (red diode has lower internal resistance than blue diode so when the red diode is "ON" the current "prefers" to flow through red diode instead of blue diode). I had simillar problem at first because i connected both anodes to 5V via one resistor.

    • @ForOurGood
      @ForOurGood  10 หลายเดือนก่อน +1

      @wildfox1994 Your analysis is spot on, well done, and apologies to @fench1234567 as his eyes are not deceiving him, but clearly mine were. Reviewing the video in the editor at that time confirms the strange behavior, and you can basically see the legs of the LED's are unintentionally touching (maybe only in this portion of the video, later on it seems ok). Be assured however, the code however is working ok, and doing the correct thing, it was just my fumbling fingers when I took that shot which caused this aberration. Sorry about that!

  • @Vee-Gee
    @Vee-Gee ปีที่แล้ว +2

    I really hope you keep this series going. There aren't many delving deep into practical use programming with these microcontrollers. You seem to be very skilled and I can't wait to see what I learn from you next!

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      Well thanks for the motivational comment! Actually doing TH-cam videos can be a soul sapping experience, I might even spend many weeks making a video, only to get a total of 100 views or so. Actually the first video in this programming series was stuck at about 100 views for quite a few months, but now has over 11K views adding 40 views daily.. go figure.. Anyway, I have been having a small break to recover from the last waste of time, but be assured I will be back with some new content soon. I actually have a plan already in place for a few new programming lessons, so we'll see how that works out.

  • @smpplaza6673
    @smpplaza6673 2 ปีที่แล้ว +2

    Love that wait() thingy!!

  • @jstro-hobbytech
    @jstro-hobbytech ปีที่แล้ว +1

    I'm making a program where I was going to use the wait millis and was brainstorming how. Great idea man. Thank you

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว +1

      Your very welcome, and thanks for taking the time to comment!

    • @jstro-hobbytech
      @jstro-hobbytech ปีที่แล้ว +1

      @@ForOurGood you'll get sick of hearing from me. I plan to learn this series. I can do it in a multicore environment but not on an uno. It's easy to tell you code like you breath haha

  • @smpplaza6673
    @smpplaza6673 2 ปีที่แล้ว +1

    Awesome job mate! And huge thanks for taking the effort to document and explain this to us! Your other video on menus and this topic were the two things I really needed some insight on. I do say as a rookie I've had some difficulties following some parts, but that's where the convenience of YT play/pause comes in handy. Fully stocked on lilygo stuff so I know what I'm doing this winter holiday ;)

    • @ForOurGood
      @ForOurGood  2 ปีที่แล้ว

      Well thanks so much for that, I am glad to hear it was useful to you! Wish you all the best on your winter programming adventure. Let me make a bad guess, Mate+Winter=UK?

  • @teeLgnihteoms
    @teeLgnihteoms 2 ปีที่แล้ว +1

    Truly thankful that I found your videos. Keep it up.

    • @teeLgnihteoms
      @teeLgnihteoms 2 ปีที่แล้ว +1

      If you would like to increase your audience, I would suggest reevaluating the thumbnail for your videos. The thumbnails you’re using are not an accurate representation of your content. I must have skipped your videos 10 times, before I was forced to click on one - out of desperation. Now, I watch your uploads 10 times a day… just a suggestion.

    • @ForOurGood
      @ForOurGood  2 ปีที่แล้ว +1

      @@teeLgnihteoms Happy to hear the video was useful for you! Great feedback about seeing the videos but not clicking on them. Was this from a list of search results or was TH-cam proactively recommending the video? Amazingly the first video in this series finally took off after months of no real views (most of these views come from search and click). But you are absolutely right about the inappropriate thumbnails. It sort of happened because I gave up a bit after the apparent failure of EP1, this combined with the fact that it's not so simple to make them given the subject matter. But as I am now getting a few more views for this series, as well as some positive feedback as to thier usefulness, I will likely take a look at how I can improve the thumbnails to make sure the target audience can identify the content more easily when they see it. Thanks again 🙏

    • @teeLgnihteoms
      @teeLgnihteoms 2 ปีที่แล้ว +1

      ​@@ForOurGoodI have few more suggestions if you don't mind...
      1) keep your intro short and brief
      2) present your intro as if you're reading a table of contents
      3) use time-stamp for quick reference
      4) break your videos up into a series of 10 minute long episodes. (30 min long videos might discourage some viewers)
      5) reconsider the font you're using
      6) using all caps in your thumbnail is unsettling. It's not inviting...

    • @ForOurGood
      @ForOurGood  2 ปีที่แล้ว +1

      Don't mind at all, I have an open mind, and will give some thought to the suggestions you provided. But overall, I am pretty casual with the approach to this channel (it is just a hobby after all). Of course, it would be nice if it could be useful to people too, but mostly I am just letting the chips fall as they may! As for (4), I can't do that, as that will drive my other subscribers away who are not here for the programming. (5&6) After changing to this font I actually started getting allot more views. So, I guess it affects different people different ways. FYI: The lower case for this font is actually smaller uppercase. I am actually using lower case (of course I got your point). Right now, the font and general style of the thumbnail has been used for so long I think it helps people identify my channels content (i.e., existing viewers). Probably the best thing to do for a first step is to improve the images or graphics used. and of course, improve the titles as best I can. Thanks for the suggestions!

  • @Dalton0521
    @Dalton0521 2 ปีที่แล้ว +1

    You seem to be some genius. Keep spreading your knowledge. Thank you so much!

    • @ForOurGood
      @ForOurGood  2 ปีที่แล้ว

      I am not sure genius is appropriate ;-), but I do appreciate the compliment! But I will do my best to share what I can, and have been enheartened by seeing many people of all age groups, from all over the world, taking the time to watch an learn! Thanks so much for the comment.

  • @MrZhefish
    @MrZhefish 2 ปีที่แล้ว +2

    don't worry, keep at it, you'll have more subscribers in the future, also if you include more machining too. the first 1000 subs are usually the hardest :-) thank you for the menu/switch case explanation. i'm not done yet going out on a lcd with it, but it's highly appreciated, as i'm building a seeding machine for the garden, and to select the seeding distance in which the stepper will drop the seeds i needed exactly that

    • @ForOurGood
      @ForOurGood  2 ปีที่แล้ว

      Oh I am not really all that worried about subscriber count, but it would be nice if people at least had the chance to see these videos, especially if it was something of use too them. Actually takes many days or weeks to put together a video, and if there is little possibility of people getting a chance to watch it, then I must admit that sometimes it's hard to remain motivated. So thanks for the comment, and I am glad to hear it is helping you. I hope you catched the 4th episode of this series where I show the menu structure used on a LCD. Probably some machining coming up soon, but I am not a machining channel, and there are plenty of serious machining channels already out there. Likely to the detriment of the channel, I just cover a topic as it takes my interest, which is probably why the TH-cam algorithm is confused about the channel. Wish you good luck with your project!

  • @NicholasRadina
    @NicholasRadina 2 ปีที่แล้ว +1

    Thank you for this!

    • @ForOurGood
      @ForOurGood  2 ปีที่แล้ว

      You are very welcome!

  • @Nordic_Mechanic
    @Nordic_Mechanic ปีที่แล้ว +1

    I got here before the silver play button. Traction is luck. As Roman Atwood told Whistlin Diesel. "someone at google has to like you or you wouldnt be trending"

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      Yeah about 50 years before the silver play button to early. Actually, I started TH-cam as an experiment and personal therapy, so ultimately whatever really. But it is funny you should say "luck", as this matches with my analysis of TH-cam's current business model works. TH-cam works pretty much like a lottery, it entices huge numbers of people to spend copious amounts of time making content for free, with the hope of hitting it big. Currently all of this free content has heaps of ads being placed in it, I would love to know the exact figures, but I am sure far far more ad revenue is earned from content where they don't pay a cent for compared to that which is revenue share. With this model TH-cam, is naturally motivated to let the occasional "lucky" channel out of the cage, but for the rest the impressions will be carefully controlled to ensure that these free content providers stay effectively free (my stats show this manipulation clearly, and I hate conspiracy theories). You might think this business model is crazy, content creators will leave TH-cam, and they do all the time.. but there are always millions more people (suckers) out there waiting to get lucky, so there will always be plenty of free content, with many people wasting thier lives and mental health away. So effectively it is much like a lottery, the only difference is a lottery is honest with its business model, TH-cam maybe much less so. What do you reckon?

    • @Nordic_Mechanic
      @Nordic_Mechanic ปีที่แล้ว +1

      ​@@ForOurGood It doesnt matter to them if its big youtuber or random guy like me. All those who become partner and try makes them money. 100 people making 100 times less impressions and click through than 1 youtuber makes them the same money. So yes, as long as new users comes in, they stopped caring. Hence the shitier and shitier terms and conditions youtubers are experiencing.
      The good thing about my channel and yours, is we dont really on anything such as profanity or kids or explosives or gun. You know all the things youtube hates since becoming a kindergarten.
      So Im still ok for some time before im labelled a dangerous extremist terrorist for repairing a car or a tv.
      I also do it for fun and im happy I get a little 100$ once in a while (the minimun they send you)
      Comments saying I saved them hundreds of dollars are what really pays me.
      We need to selflessly help to fell better, and yt is one of my ways to do so.
      On a brighter note. I`ll be trying some of your multitasking routine. I want to see if It can be precise enough versu an interupt from a timer. I only need a precise 1 to 10 hz task then the rest are not too time sensitive.

  • @completelyleftover7695
    @completelyleftover7695 ปีที่แล้ว +1

    Можете код прикрепить? Трудно следить по видео.

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว +1

      Sorry, I sent the wrong comment before, please ignore that. Generally I do not provide the raw code. I did this for episode 1 only as a special case. My hope is for you to learn by trying yourself. Good luck!

  • @jstro-hobbytech
    @jstro-hobbytech ปีที่แล้ว

    No videos lately brother what's up?

    • @ForOurGood
      @ForOurGood  ปีที่แล้ว

      Busy busy! hopefully video this weekend.