Search found 5057 matches

by pythoncoder
Fri Apr 09, 2021 1:57 pm
Forum: MicroPython pyboard
Topic: How to trigger delayed callback from interrupt
Replies: 2
Views: 91

Re: How to trigger delayed callback from interrupt

I would use a uasyncio based software timer: import uasyncio as asyncio from primitives.delay_ms import Delay_ms from machine import Pin from pyb import LED led = LED(1) async def my_app(): tim = Delay_ms(func=lambda : led.off(), duration=100) def irq_han(_): led.on() tim.trigger() # Start the timer...
by pythoncoder
Fri Apr 09, 2021 1:12 pm
Forum: Drivers for External Components
Topic: Update to font_to_py for tiny fonts
Replies: 3
Views: 379

Re: Update to font_to_py for tiny fonts

I have no idea what /lib/ili934xnew.py is. My ILI9341 driver is this one . Python fonts produced by font_to_py.py are compatible with my nano_gui , Writer and CWriter classes, using my drivers. The specification for the files is documented, so other authors may choose to support them. Or they may us...
by pythoncoder
Fri Apr 09, 2021 1:02 pm
Forum: Pyboard D-series
Topic: ntptime kills the wifi station, hard reset required to fix
Replies: 7
Views: 274

Re: ntptime kills the wifi station, hard reset required to fix

Perhaps I'm misunderstanding the problem here, but this works for me on a Pyboard D SF2W: MicroPython v1.13-107-g18518e26a-dirty on 2020-11-02; PYBD-SF2W with STM32F722IEK Type "help()" for more information. >>> import do_connect >>> do_connect.do_connect() connecting to network... network config: (...
by pythoncoder
Thu Apr 08, 2021 5:07 am
Forum: Pyboard D-series
Topic: ntptime not included with PyBoard firmware
Replies: 11
Views: 288

Re: ntptime not included with PyBoard firmware

@kwiley It is easy if your location is static and you handle the date for the change; you are doing it correctly. Full Unix support is not easy as it involves knowing the DST parameters for every country in the world. And they don't always get it right: I have an old project with firmware from an an...
by pythoncoder
Thu Apr 08, 2021 4:56 am
Forum: MicroPython pyboard
Topic: Did I break my board?
Replies: 1
Views: 95

Re: Did I break my board?

I'm afraid it sounds as if you have. I can only think of one thing left to try, which is to see if you can flash new firmware, but given the symptoms I don't hold out much hope :(
by pythoncoder
Wed Apr 07, 2021 4:39 pm
Forum: Pyboard D-series
Topic: ntptime not included with PyBoard firmware
Replies: 11
Views: 288

Re: ntptime not included with PyBoard firmware

You might be interested in these notes on Pyboard D RTC accuracy and calibration.
by pythoncoder
Wed Apr 07, 2021 4:35 pm
Forum: Raspberry Pi microcontroller boards
Topic: Raspberry Pi Pico micropython ModbusRTU
Replies: 2
Views: 261

Re: Raspberry Pi Pico micropython ModbusRTU

Try a forum search on Modbus.
by pythoncoder
Wed Apr 07, 2021 4:32 pm
Forum: General Discussion and Questions
Topic: Custom newline characters when reading files
Replies: 1
Views: 68

Re: Custom newline characters when reading files

It's unsupported. You'll have to read it as a binary file and parse it yourself, I'm afraid.
by pythoncoder
Wed Apr 07, 2021 4:14 pm
Forum: Raspberry Pi microcontroller boards
Topic: MicroPython Time Display
Replies: 2
Views: 135

Re: MicroPython Time Display

You might prefer this format string

Code: Select all

"{:02d}/{:02d}/{} {:02d}:{:02d}"
particularly for the time display as times like 1:2 arguably look better rendered as 01:02.
by pythoncoder
Wed Apr 07, 2021 7:01 am
Forum: General Discussion and Questions
Topic: asyncio tcp_echo_client example from python.org not working
Replies: 2
Views: 79

Re: asyncio tcp_echo_client example from python.org not working

I think this error implies a communication problem with your network peer.