Search found 902 matches

by kevinkk525
Thu Apr 15, 2021 5:20 am
Forum: Raspberry Pi microcontroller boards
Topic: UART not working with today's version of micropython
Replies: 32
Views: 528

Re: UART not working with today's version of micropython

Maybe I'm missing something but my understanding is, that if anything should be missing, it's the end of the message, not the start? Wh, would "heart" disappear? Apart from that I never used readline() but would expect it to only return something when it had a full line (otherwise returning none?). ...
by kevinkk525
Tue Apr 06, 2021 12:21 pm
Forum: ESP32 boards
Topic: Threads
Replies: 6
Views: 449

Re: Threads

by kevinkk525
Mon Apr 05, 2021 6:12 pm
Forum: General Discussion and Questions
Topic: asyncio wait for task in a group
Replies: 9
Views: 229

Re: asyncio wait for task in a group

In V3 you can always clear down an event immediately after setting it: I think this is normally the best way to use the class as it keeps the set/clear logic in one place. This avoids risks of an event being set and not cleared. I would highly recommend not to do that. It's not a matter of how V3 w...
by kevinkk525
Mon Apr 05, 2021 12:40 pm
Forum: General Discussion and Questions
Topic: asyncio wait for task in a group
Replies: 9
Views: 229

Re: asyncio wait for task in a group

Don't clear the event in the reading method, let the main loop do that. As for the 2 seconds delay, you can change that by turning your main loop around a bit: async def update_display(display): # if needed wait a few ms on startup while True: print('Update display') display.fill(0) display.text('Te...
by kevinkk525
Mon Apr 05, 2021 7:48 am
Forum: General Discussion and Questions
Topic: asyncio wait for task in a group
Replies: 9
Views: 229

Re: asyncio wait for task in a group

You can poll all events like: a=[event1,event2,event3] for event in a: if event.is_set(): # process LCD event.clear() await asyncio.sleep_ms(20) The downside is obviously that it checks all the events every 20ms and is therefore less efficient than awaiting a single event directly. Also it might tak...
by kevinkk525
Fri Apr 02, 2021 7:33 am
Forum: ESP8266 boards
Topic: Having issues with trying to catch "OneWireError" exception
Replies: 21
Views: 708

Re: Having issues with trying to catch "OneWireError" exception

ds.scan() is unlikely to throw an exception. In my application I catch oneWire errors on conversion and any type of error on reading: https://github.com/kevinkk525/pysmartnode/blob/0cd27d9aecdac334abbd70d939d03d68832e164b/pysmartnode/components/sensors/ds18.py#L148 https://github.com/kevinkk525/pysm...
by kevinkk525
Tue Mar 30, 2021 4:14 pm
Forum: ESP8266 boards
Topic: Is there an updated guide about how to use esp-open-sdk?
Replies: 6
Views: 312

Re: Is there an updated guide about how to use esp-open-sdk?

oh, then my chain might have pulled that version before it got removed. Thanks for reporting the needed change.
by kevinkk525
Tue Mar 30, 2021 5:21 am
Forum: ESP8266 boards
Topic: Having issues with trying to catch "OneWireError" exception
Replies: 21
Views: 708

Re: Having issues with trying to catch "OneWireError" exception

You might need to catch "onewire.OneWireError"
by kevinkk525
Mon Mar 29, 2021 7:06 am
Forum: ESP8266 boards
Topic: Is there an updated guide about how to use esp-open-sdk?
Replies: 6
Views: 312

Re: Is there an updated guide about how to use esp-open-sdk?

Ubuntu 20.04 installs:
Note, selecting 'libexpat1-dev' instead of 'libexpat-dev'
libexpat1-dev is already the newest version (2.2.9-1build1)

So where do you pull 2.1 from?
by kevinkk525
Sat Mar 27, 2021 4:09 pm
Forum: Programs, Libraries and Tools
Topic: Micropython on Linux, problen with *.mpy
Replies: 2
Views: 172

Re: Micropython on Linux, problen with *.mpy

or build micropython-dev for the unix port which includes uasyncio. (And complain on github so uasyncio gets finally merged in the non-dev unix port...)