Search found 5216 matches

by pythoncoder
Thu Jun 24, 2021 3:55 am
Forum: General Discussion and Questions
Topic: Concurrency
Replies: 2
Views: 64

Re: Concurrency

See this section in my uasyncio tutorial.
by pythoncoder
Wed Jun 23, 2021 8:00 am
Forum: Drivers for External Components
Topic: I/O capable GUI
Replies: 1
Views: 221

I/O capable GUI

micro-gui is an alternative to nano-gui . Both are portable between hosts, and both use the same display drivers providing portability to a range of displays. While nano-gui is display-only, micro-gui has provision for user input via a set of from 2-5 pushbuttons. Alternatively a joystick-style nav...
by pythoncoder
Wed Jun 23, 2021 6:45 am
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 19
Views: 751

Re: RPi pico machine.SPI periodic dropout.

The upshot of the GitHub discussion is that interrupts defined with machine.Pin.irq() default to soft ISR's (a fact which is documented and I'd failed to spot). For fast, deterministic handling you need to set hard=True . This means that you can't allocate in the handler, which rules out any floatin...
by pythoncoder
Wed Jun 23, 2021 6:33 am
Forum: Programs, Libraries and Tools
Topic: Micropython: Unable to fix IndexError: bytes index out of range issue. Help to fix this Please.
Replies: 4
Views: 246

Re: Micropython: Unable to fix IndexError: bytes index out of range issue. Help to fix this Please.

It's failing on connect. I think client_id needs to be a bytes object rather than a string. Try:

Code: Select all

CLIENT_ID=b'ESP32_TH'
by pythoncoder
Tue Jun 22, 2021 5:52 am
Forum: Programs, Libraries and Tools
Topic: Micropython: Unable to fix IndexError: bytes index out of range issue. Help to fix this Please.
Replies: 4
Views: 246

Re: Micropython: Unable to fix IndexError: bytes index out of range issue. Help to fix this Please.

Please post a simple code sample which demonstrates the problem. Then someone may be able to comment.
by pythoncoder
Mon Jun 21, 2021 8:53 am
Forum: General Discussion and Questions
Topic: unregister interrupt handler (callback)?
Replies: 1
Views: 47

Re: unregister interrupt handler (callback)?

I think you can issue Pin.irq with handler=None. However I've never actually tried this.
by pythoncoder
Sat Jun 19, 2021 2:48 pm
Forum: Raspberry Pi microcontroller boards
Topic: RPi pico machine.SPI periodic dropout.
Replies: 19
Views: 751

Re: RPi pico machine.SPI periodic dropout.

@JWF Now done, please see here.

MicroPython sourcecode is hosted on GitHub. Raising an issue is the way to report firmware bugs, so hopefully this will be addressed by the maintainers in due course.
by pythoncoder
Fri Jun 18, 2021 11:37 am
Forum: Programs, Libraries and Tools
Topic: Micropython asynchronous function for garage door opener
Replies: 5
Views: 162

Re: Micropython asynchronous function for garage door opener

My Pushbutton class to which you refer is for interfacing a physical switch: it copes with debouncing, detecting long and double presses, and suchlike. There is a simpler Switch class which just debounces an on/off switch or button. However your Pushbutton method is called from code, not from a phys...
by pythoncoder
Thu Jun 17, 2021 3:48 pm
Forum: General Discussion and Questions
Topic: Implementing SENT Interface in MicroPython?
Replies: 10
Views: 255

Re: Implementing SENT Interface in MicroPython?

I have no idea whether this is feasible - I think you're breaking new ground here. It depends on whether there is a significant overhead in calling a C function which was specified in Python as an ISR. Otherwise you may need to figure out how, in C, to allocate a function to an interrupt. I've often...