Search found 5082 matches

by pythoncoder
Sun Apr 18, 2021 12:26 pm
Forum: Programs, Libraries and Tools
Topic: Is passing 'self' to another class possible
Replies: 1
Views: 74

Re: Is passing 'self' to another class possible

Most applications involving displays instantiate the display early in the code's execution. That instance - typically a global singleton - is then available for use by any other object.
by pythoncoder
Sun Apr 18, 2021 12:21 pm
Forum: General Discussion and Questions
Topic: Time control in a while loop
Replies: 2
Views: 104

Re: Time control in a while loop

I would look at uasyncio. There is a learning curve, but in most cases it's the easiest way to manage tasks involving time delays. See the docs and this tutorial.
by pythoncoder
Sun Apr 18, 2021 12:18 pm
Forum: Raspberry Pi microcontroller boards
Topic: Wifi bridge for RPI Pico
Replies: 36
Views: 2981

Re: Wifi bridge for RPI Pico

... Difficult, but not impossible... I was suggesting that supporting MQTT using the ESP in its original "modem" mode would be problematic. I fully accept that it should be possible to write a MicroPython driver to provide a BSD socket to a non-networked client. This would communicate via a UART wi...
by pythoncoder
Fri Apr 16, 2021 11:38 am
Forum: ESP32 boards
Topic: ESP-Now support for ESP32 (and ESP8266)
Replies: 67
Views: 8027

Re: ESP-Now support for ESP32 (and ESP8266)

...I'm not sure if it is useful to handle such a small delay with asyncio. Fair point. A non-sync send() returns in less than a millisecond. As the ESP-Now docs say, these responses come from very low down in the network stack and don't guarantee the message has been or will ever be received by an ...
by pythoncoder
Fri Apr 16, 2021 11:30 am
Forum: General Discussion and Questions
Topic: Installing uasyncio V3
Replies: 4
Views: 321

Re: Installing uasyncio V3

upip is intended to run on a device with a network connection. For non-networked targets there is micropip which runs under CPython and enables libraries to be installed to a PC's filesystem: the result can then be copied to the target's filesystem.
by pythoncoder
Fri Apr 16, 2021 11:26 am
Forum: ESP32 boards
Topic: DAC Problem
Replies: 3
Views: 139

Re: DAC Problem

The other option is to use a host with a decent DAC such as a Pyboard. Note that, in my testing, the ESP32 DAC is also adrift at the high end of its range.
by pythoncoder
Thu Apr 15, 2021 7:46 am
Forum: General Discussion and Questions
Topic: Fade 1 image to show another.
Replies: 6
Views: 369

GC9A01 display driver

OK, so the question is whether anyone has written a MicroPython driver for the GC9A01 display. I'm not aware of one, and a forum search draws a blank. You may have to DIY. This usually involves porting Arduino C code to MicroPython, a task that requires familiarity with low level coding in both lang...
by pythoncoder
Thu Apr 15, 2021 7:37 am
Forum: MicroPython pyboard
Topic: Input voltage limit, V+ as output, and actuator power supply options
Replies: 4
Views: 168

Re: Input voltage limit, V+ as output, and actuator power supply options

The two V+ pins are connected together so what you're suggesting would work. However that is not how I'd wire it as the current for your peripherals would pass through the Pyboard's PCB traces. If high currents are involved - and you mentioned actuators - this is not a good idea. Better to power the...
by pythoncoder
Thu Apr 15, 2021 7:30 am
Forum: ESP8266 boards
Topic: Difference between print() and uart.write()
Replies: 4
Views: 183

Re: Difference between print() and uart.write()

I don't really understand what you're doing here, perhaps you could clarify. The purpose of print() and uart.write() are entirely different. This is a session on a Pyboard: >>> from pyb import UART >>> uart = UART(1) >>> uart.write(b'\xff\xfd\x18') 3 >>> uart.write returns 3 because 3 bytes were tra...