Search found 16 matches

by iotman
Wed Feb 13, 2019 5:42 pm
Forum: ESP32 boards
Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Replies: 21
Views: 1573

Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC

Hi Peter, thank you very much for your reply; it is very much appreciated.

I will follow your advice and study the Python syntax. My main problem was the de-bouncing, and that async approach of yours works like a charm.

Best Regards, AB
by iotman
Tue Feb 12, 2019 6:10 pm
Forum: ESP32 boards
Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Replies: 21
Views: 1573

Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC

Hi Peter, I'm surprised that it seems so difficult to monitor inputs and run a web server at the same time; I would have thought a lot of folks would want to do that. I'll keep working on it, studying the code to figure out the polling. I'm also going to try and get that fully fledged web server run...
by iotman
Mon Feb 11, 2019 5:55 pm
Forum: ESP32 boards
Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Replies: 21
Views: 1573

Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC

Hi Peter, thanks for your reply. I agree that I should try to get the async approach working, but I can't seem to get any of the socket code working. I tried that more complex server code, but immediately got an error: File "a8.py", line 15, in <module> ValueError: cannot perform relative import I a...
by iotman
Sun Feb 10, 2019 10:09 pm
Forum: ESP32 boards
Topic: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC
Replies: 21
Views: 1573

Re: ESP32 Debouncing Switches & Relays: IRQ Timer vs Simple Code vs ASYNC

Hi Peter, one other thought I had was to put the button press code into an interrupt timer, and leave the socket code as is. Do you think that might work? It would foil the attempt at a full async solution, but I'm feeling a bit leery of the polling socket code as so much of my code is involved with...
by iotman
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: 1573

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 ...
by iotman
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: 1573

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...
by iotman
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: 1573

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 ...
by iotman
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: 1573

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...
by iotman
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: 1573

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...
by iotman
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: 1573

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...