Search found 4803 matches

by pythoncoder
Fri Jan 22, 2021 9:29 am
Forum: Programs, Libraries and Tools
Topic: Pure MicroPython Matrix (mathematics)
Replies: 2
Views: 40

Re: Pure MicroPython Matrix (mathematics)

There is also ulab but that requires compiling the firmware.
by pythoncoder
Fri Jan 22, 2021 9:25 am
Forum: ESP32 boards
Topic: how to debounce these interrupts
Replies: 1
Views: 14

Re: how to debounce these interrupts

I use uasyncio with this debouncer rather than using interrupts.
by pythoncoder
Fri Jan 22, 2021 9:17 am
Forum: MicroPython pyboard
Topic: How to change the bits to binary?
Replies: 1
Views: 9

Re: How to change the bits to binary?

Converting from JPEG to a bitmap involves a lot of mathematics: the JPEG format is highly compressed. Options are to find a library which can do the conversion on the Pyboard, use a different file format, or - if you just want to display an image - use a display which can handle JPEG streams nativel...
by pythoncoder
Thu Jan 21, 2021 4:38 pm
Forum: MicroPython pyboard
Topic: Threading on PyBoard 1.1
Replies: 7
Views: 137

Re: Threading on PyBoard 1.1

You will need eight asynchronous routines. Whether these are functions or bound methods depends on the way you plan to share data. This is down to general programming practice - bound variables or bound objects are generally better practice than using globals.
by pythoncoder
Thu Jan 21, 2021 4:28 pm
Forum: General Discussion and Questions
Topic: How to improve interrupt handler function pick up?
Replies: 4
Views: 47

Re: How to improve interrupt handler function pick up?

Debouncing? Unless the touch controller datasheet says otherwise it shouldn't be needed: contact bounce is a feature of mechanical switches.
by pythoncoder
Thu Jan 21, 2021 4:23 pm
Forum: MicroPython pyboard
Topic: Threading on PyBoard 1.1
Replies: 7
Views: 137

Re: Threading on PyBoard 1.1

If you're using uasyncio - which is usually the best approach - you should use the stream mechanism which handles concurrency and buffering.
by pythoncoder
Thu Jan 21, 2021 4:19 pm
Forum: General Discussion and Questions
Topic: RPi makes ther own Mico controller
Replies: 8
Views: 216

Re: RPi makes ther own Mico controller

... If you're talking about the PIO controllers, my understanding is that they run independently of _both_ main cores. i.e. they are in a sense their own independent microcontrollers with DMA. Indeed. The PIO comprises two blocks, each containing four independently programmable state machines. The ...
by pythoncoder
Thu Jan 21, 2021 11:58 am
Forum: General Discussion and Questions
Topic: How to improve interrupt handler function pick up?
Replies: 4
Views: 47

Re: How to improve interrupt handler function pick up?

I have developed GUI's for three different touchscreens, using the same general approach. Hardware interrupts are not used. The touch controller is polled by a uasyncio task which runs continuously. An example may be seen here . The responsiveness is fine. In my view interrupts are only necessary wh...
by pythoncoder
Thu Jan 21, 2021 10:31 am
Forum: General Discussion and Questions
Topic: machine.RTC().datetime() gives incorrect hours, minutes, and day of the week
Replies: 3
Views: 61

Re: machine.RTC().datetime() gives incorrect hours, minutes, and day of the week

... Got it, thanks. There appears to be a discrepancy between utime.localtime() and machine.RTC().datetime()... There is. utime.localtime matches CPython's time module. Unfortunately RTC.datetime() - which isn't even documented - adopts a different convention which is based on STM hardware and the ...
by pythoncoder
Thu Jan 21, 2021 10:23 am
Forum: General Discussion and Questions
Topic: RPi makes ther own Mico controller
Replies: 8
Views: 216

Re: RPi makes ther own Mico controller

The programmable I/O sounds particularly clever. I'll try to track down some docs...