Search found 52 matches
- Sun Feb 10, 2019 3:27 pm
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hi Peter, I did not realize I was using something that was blocking; I had assumed wrongly that setting s as non-blocking would be enough; thanks for pointing that out. I was hoping for a simpler solution, but down the rabbit hole I go ... So it seems I have to use the polling version of the socket ...
- Sun Feb 10, 2019 12:42 am
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hi Peter, I have spent quite a few hours trying to make this work with your debounce code, specifically the "Test for the Pushbutton class (coroutines)". I am wanting to provide the ability to register button presses connected to input pins on the ESP32, and that code of yours works perfectly. The p...
- Sat Feb 09, 2019 6:13 pm
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hi Peter, thanks for your reply and pointers, it is appreciated. I only use a very minimalist socket, so the temporary folder code looks familiar, and I already use a non-blocking socket, so I'll give that a try. I think my biggest challenge is to stop thinking about coding sequentially and realize ...
- Sat Feb 09, 2019 3:20 am
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hi, the async module is working beautifully, but one final hurdle I'm running into is that my program uses a socket to display a web page, but it seems that the socket is no longer launched. Should the socket be embedded into the async code somewhere, in order for it to work? I'm thinking it may nee...
- Thu Feb 07, 2019 4:41 pm
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hi Peter, you're right, the problem is resolved! The clue was the fact that it immediately quit, displaying the REPL prompt on the Terminal screen (I'm using Linux Ubuntu on most of my laptops). I put 3 questions marks in the previous post to highlight the clue. It was because I am pulling my inputs...
- Thu Feb 07, 2019 12:11 am
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Delay Code vs ASYNCIO
Hi, I spent a few hours reading and studying the async tutorial; it was very interesting. Even though MicroPython is a subset of Python, it seems very capable, with many features that I won't use (famous last words?). So I modified the test program to work with my board, but I could not get it to re...
- Wed Feb 06, 2019 2:11 pm
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNCIO
Hi, a brief update ... I have now tried the simple delay approach and the interrupt timer approach for debouncing switches and relays, but neither gave me dependable results on my ESP32 board, and I also ran into memory issues. This could certainly be due to my inexperienced coding in Micropython, b...
- Mon Feb 04, 2019 4:43 pm
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hi Peter, I have used your async approach in a different application, and it worked well. I really like the idea that I can write an async app that would work in a similar way to something I could write with Javascript, but that with Python and Micropython I am not always forced to do it that way. S...
- Mon Feb 04, 2019 8:39 am
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hi @mattyt, thanks for your response. I suppose the point of either using Zack's interrupt timer approach or Peter's async approach is that it does not delay program execution like the code snippet above does. In my case I wouldn't worry much about a 200 msec delay, so I will likely stick with that ...
- Mon Feb 04, 2019 12:02 am
- Forum: ESP32 boards
- Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
- Replies: 21
- Views: 14440
ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Hello, I am using some relays (and switches) as GPIO inputs to trigger other actions by the ESP32. I am currently working on the process of de-bouncing the relays, which have a much worse 'bounce time' than the tactile switches I am also using. I was reading Zack's article about how he uses an inter...