Raspberry Pi Pico W LESSON 84: Debounce Pushbutton Switches Using Interrupts

Поделиться
HTML-код
  • Опубликовано: 29 окт 2024

Комментарии • 27

  • @edSabio572
    @edSabio572 Месяц назад +1

    Thanks Paul! Your mistake on line 13 shows you are real teacher not afraid to show your human side. I made my ckt fail on the 20th attempt and need to admit my shortcomings...Thank you so much!!!!!

  • @nigelworwood8530
    @nigelworwood8530 2 месяца назад

    I have always thought it was a good idea to leave in the "mistakees" and watch you sort it out. We learn so much. Now after 83-84 lessons I are now spotting the "errrors". Although for me this took a little time as I write all the global values separately.

  • @craigflorin1071
    @craigflorin1071 2 месяца назад +1

    I folded up like a cheap Walmart lawn chair ... several times, with much research, and many different ways. A few minutes into the video "chalk talk", I got my ah ha moment. Good lesson. Thank you!

  • @craigflorin1071
    @craigflorin1071 2 месяца назад

    Homework is complete, but it took me 52 lines of code. It works (all the time), it's functional but too long. I used counters for the 2 , 4 and 8 and reset the counters back to zero after each toggle. Can't wait to see your answer. Love the homework assignments.

  • @keithlohmeyer
    @keithlohmeyer 2 месяца назад

    Great solution! I could not figure what would work even with last weeks hint. My solution worked rock solid but used a Timer.
    So I folded up like a cheap Walmart lawn chair.
    Thanks Paul for all you do.

    • @paulmcwhorter
      @paulmcwhorter  2 месяца назад

      Keith, your solution was acceptable because you did not use a time.sleep, and I believe your timer approach was non-blocking. The issue is, when we jump over to a function, we dont want it to disrupt the timing of the main program. I hope you will enjoy the upcoming state machine lessons.

    • @keithlohmeyer
      @keithlohmeyer 2 месяца назад

      @@paulmcwhorter So looking forward to the PIO lessons. As you say not much out there on it that is understandable.

  • @MrHydyr
    @MrHydyr 2 месяца назад

    MY FIRST and THE BEST INSTRUCTOR in ROBOTICS!!! Great Thank You, Sir! God bless you and all your works!!

  • @larryplatzek9017
    @larryplatzek9017 2 месяца назад +2

    This is a Great Lesson! THANK YOU!

  • @quaternion-pi
    @quaternion-pi 2 месяца назад

    Brilliant solution; very clearly explained. I tried to figure it out using your homework programming hint, but folded like a Walmart chair. Thanks!

    • @paulmcwhorter
      @paulmcwhorter  2 месяца назад

      It has been a while quaternion, glad to see you again.

  • @shawnlowe1392
    @shawnlowe1392 2 месяца назад

    Okay, after watching, I see where my logic error was. Going to have the homework done for next by golly!! Thanks Paul

  • @U_Kamrc
    @U_Kamrc 2 месяца назад

    Much simpler debounce:
    1. detect rising edge
    2. after 10ms check if HIGH

  • @louistoweill4232
    @louistoweill4232 Месяц назад

    I got it to work in 61 lines of code using tuples to select the pertinent values of the press variable.

  • @scottwait3585
    @scottwait3585 2 месяца назад

    Thank you Paul

  • @patrickfox-roberts7528
    @patrickfox-roberts7528 2 месяца назад

    Thanks Paul - would it work with a Volatile rather than a Global declaration in the function as none of the vars are used outside of the function?

  • @deniszawad
    @deniszawad 2 месяца назад

    Great class. tank you

  • @shawnlowe1392
    @shawnlowe1392 2 месяца назад

    Okay I'll start - I folded like a cheap lawnchair! I could not get my head around the timing aspect

  • @jeraldgooch6438
    @jeraldgooch6438 2 месяца назад

    Paul- do you have thoughts on integrating the pico 2 into your classes(especially when they introduce a ‘W’) version)?

    • @paulmcwhorter
      @paulmcwhorter  2 месяца назад

      Not at this point. I see the pico 2 as an incremental improvement, but not really a practical advancement for the type of things we are doing.

  • @امينعبدالحافظعبدالباريياسين

    Thank you and l need something from you sir
    Can you make lesson about pca9685

  • @charlotteswift
    @charlotteswift 2 месяца назад

    You-know-who obviously didn't like my previous comment containing the link to my video for lessons 83 & 84.
    Therefore I'll try again - once with the link and once without. This is obviously without the link.

  • @quaternion-pi
    @quaternion-pi 2 месяца назад

    Lesson 84 homework (29 sec view time). ruclips.net/video/5lRy6cl8Ym0/видео.html
    Tried to incorporate a timer, but just used an interrupt and bitwise operators.