Search found 4575 matches

by pythoncoder
Wed Oct 28, 2020 8:43 am
Forum: Programs, Libraries and Tools
Topic: How to implement the buffer protocol
Replies: 7
Views: 104

Re: How to implement the buffer protocol

If a display has its own internal frame buffer accessible at byte level it may be simplest to ignore the framebuf class and write a dedicated driver. See the official lcd160cr driver for an example. This driver is very fast and efficient.
by pythoncoder
Wed Oct 28, 2020 8:24 am
Forum: Programs, Libraries and Tools
Topic: How to implement the buffer protocol
Replies: 7
Views: 104

Re: How to implement the buffer protocol

...I'd like to send to the display, though the I2C bus, only the bytes actively written by the FrameBuffer class... This must be highly dependent on the display hardware. If you look at the show method in this driver , the hardware allows individual display lines to be updated. The driver doesn't a...
by pythoncoder
Mon Oct 26, 2020 3:59 pm
Forum: Programs, Libraries and Tools
Topic: Event construction in micropython
Replies: 5
Views: 159

Re: Event construction in micropython

...It looks like it polls touch hardware in a loop: pin_irq is not even used! Besides, it is hard-nailed to pyboard. I have appended this section to the uasyncio tutorial to justify the use of polling in such applications. tl;dr With a cooperative scheduler, if you want to trigger a coroutine from ...
by pythoncoder
Sat Oct 24, 2020 10:26 am
Forum: Programs, Libraries and Tools
Topic: Event construction in micropython
Replies: 5
Views: 159

Re: Event construction in micropython

This GUI repo for the official display is capable of running on an ESP32. It uses uasyncio internally: applications can use it if required or simply respond to callbacks. For larger displays there is this one which is also designed for portability. Polling touch hardware actually works well. IRQ's a...
by pythoncoder
Thu Oct 22, 2020 12:43 pm
Forum: ESP32 boards
Topic: upip library installing error
Replies: 1
Views: 51

Re: upip library installing error

See the docs. But many of the platforms with network capability (e.g. most ESP8266) have umqtt installed by default.
by pythoncoder
Wed Oct 21, 2020 10:53 am
Forum: ESP8266 boards
Topic: External interrupts, different behavior between Arduino and MicroPython
Replies: 5
Views: 146

Re: External interrupts, different behavior between Arduino and MicroPython

Nor do I. But slow signals on interrupt pins are a bad idea on any hardware. At the very least the outcome will be sensitive to electrical noise.
by pythoncoder
Wed Oct 21, 2020 10:39 am
Forum: Drivers for External Components
Topic: Touch GUI for the official Pyboard display
Replies: 12
Views: 5712

Touch GUI for the official Pyboard display

I have refactored this: it is now implemented as a Python package. This is a breaking change in that an application's import statements need to be changed. In other respects the API is unchanged. The new design has the following advantages: GUI core is smaller, reducing RAM use: no need to cross-com...
by pythoncoder
Wed Oct 21, 2020 8:09 am
Forum: ESP32 boards
Topic: Sample code for MQTT
Replies: 2
Views: 95

Re: Sample code for MQTT

See examples here and here. Those are for the official MQTT clients.

There is also this unofficial client which is asynchronous and resilient against WiFi outages..
by pythoncoder
Tue Oct 20, 2020 6:06 am
Forum: ESP8266 boards
Topic: External interrupts, different behavior between Arduino and MicroPython
Replies: 5
Views: 146

Re: External interrupts, different behavior between Arduino and MicroPython

I wonder if this would best be done using polling. The idea being that you respond to the first transition on the line and ignore the rest. Pseudocode: while True: wait for pin to assume ON state t = ticks_ms() # Get run time. wait for correct phase (ensure < 10ms) trigger output trun = ticks_diff(t...
by pythoncoder
Tue Oct 20, 2020 5:35 am
Forum: General Discussion and Questions
Topic: Get a file from remote computer
Replies: 3
Views: 86

Re: Get a file from remote computer

As far as I know it is impossible to connect an ESP32 over a network to Windows file sharing.

The only solution I can think of is to use a Raspberry Pi to connect to the file share using Samba and have it broadcast the file using a supported protocol.