Search found 41 matches

by bitrat
Tue Nov 02, 2021 8:21 pm
Forum: General Discussion and Questions
Topic: micropython.schedule() queue length
Replies: 6
Views: 2656

Re: micropython.schedule() queue length

Debouncing is handled because every edge is accounted for. If a bounce occurs, on every edge of the bounce the count changes. . . . What you're observing seems far too deterministic to be contact bounce. I suspect something else is going on. Yes, my first driver only responded to edges on one pin, ...
by bitrat
Mon Nov 01, 2021 5:31 pm
Forum: General Discussion and Questions
Topic: micropython.schedule() queue length
Replies: 6
Views: 2656

Re: micropython.schedule() queue length

Hmmm. So are the soft IRQ's called in the main thread?? I didn't realise that! Btw, I hope you don't think I was trying to improve on your code! Just hacked it to demonstrate my approach. :) Not sure how your code debounces, but maybe it's the encoder I'm using. Without a delay I get ~16 extra steps...
by bitrat
Mon Nov 01, 2021 4:16 am
Forum: General Discussion and Questions
Topic: micropython.schedule() queue length
Replies: 6
Views: 2656

Re: micropython.schedule() queue length

Hi Peter, thanks for this! I imagined millisecond rate queue clearance would be more realistic. I'm not sure what's happening with my code, but I get the same effect with this simplified version. Maybe it's my use of asyncio that's wrong... Anyway, I liked your encoder driver much better than mine, ...
by bitrat
Sat Oct 30, 2021 6:56 pm
Forum: Programs, Libraries and Tools
Topic: Is ampy unreliable
Replies: 4
Views: 2197

Re: Is ampy unreliable

I use and recommend rshell. It's also worth getting to know mpremote . This is an official tool. A powerful feature is that you can mount a PC directory on the target hardware's filesystem. This lets you run complex applications without altering the target's file storage. Thanks, still getting arou...
by bitrat
Sat Oct 30, 2021 6:00 pm
Forum: General Discussion and Questions
Topic: micropython.schedule() queue length
Replies: 6
Views: 2656

micropython.schedule() queue length

Hi, I have a rotary encoder (functioning as a volume control) with an interrupt handler which schedules a user mode handler. The rate of interrupts causes the schedule queue to overflow, even with a debounce time of several hundred ms, so it seems the queue can only manage about 1 interrupt per seco...
by bitrat
Sun Oct 10, 2021 8:09 pm
Forum: General Discussion and Questions
Topic: id from Pin object
Replies: 2
Views: 1487

Re: id from Pin object

Hi Peter, thanks for this. Unfortunately, on my board, there's no Pin.name() The dictionary approach is against my principles, in that it introduces more than one record of the same information and moves locally accessible data into a global scope. I'm using ints as pin names (eg: 'GPIO14' is 14). I...
by bitrat
Fri Oct 08, 2021 6:31 pm
Forum: General Discussion and Questions
Topic: id from Pin object
Replies: 2
Views: 1487

id from Pin object

I seem to recall that the interrupt handler for edges on pins used to take a pin id (typically an int in my case) as an argument, but apparently it now takes the pin object, 'Pin(10)', or whatever... I've searched in vain for a way to get the id from the Pin object. Do I need to parse the string rep??
by bitrat
Fri Oct 08, 2021 5:04 pm
Forum: Programs, Libraries and Tools
Topic: Is ampy unreliable
Replies: 4
Views: 2197

Re: Is ampy unreliable

Thanks, looks good! It'll be good to have one tool for files and REPL

Something tells me the problem I'm having is system related tho. Just don't have time right now to spelunk it...
by bitrat
Fri Oct 08, 2021 1:23 am
Forum: Programs, Libraries and Tools
Topic: Is ampy unreliable
Replies: 4
Views: 2197

Is ampy unreliable

Hi, Last time I used ampy it was very robust, to the point that I could call it from makefiles and trigger hardware tests, etc. A lot of that was running the tool from Windows 10 using WSL. I'm now using it to talk to the same boards, from my Ubuntu system. It often fails and (to be fair) I think pi...
by bitrat
Thu Oct 07, 2021 6:21 pm
Forum: General Discussion and Questions
Topic: uasyncio reactor loop?
Replies: 0
Views: 781

uasyncio reactor loop?

Hi, I've made some progress on this, but interested in comments from uasyncio afficianadoes. Am I doing it right? Here's what the program does: Handle interrupts and post events to a shared event queue. Read a socket and post received messages to a shared event queue. Post 'ping' events to a shared ...