Search found 3667 matches

by Roberthh
Thu Aug 18, 2022 8:45 am
Forum: Raspberry Pi microcontroller boards
Topic: AttributeError: 'FrameBuffer' object has no attribute 'height'
Replies: 2
Views: 3078

Re: AttributeError: 'FrameBuffer' object has no attribute 'height'

Which module/line flags the error? or can you show the full error message with context?
by Roberthh
Thu Aug 18, 2022 7:02 am
Forum: General Discussion and Questions
Topic: Check if UART write is complete?
Replies: 7
Views: 9022

Re: Check if UART write is complete?

Looking into various ports, the flush() method may be doable. API rc = uart.flush([timeout]) where rc is True, is the flush succeeded, and False, if the timeout happens. The default timeout is t.b.d. (either 0 or infinite). For ESP32 this does not seem to be a problem. There is an appropriate sdk ca...
by Roberthh
Wed Aug 17, 2022 8:28 pm
Forum: General Discussion and Questions
Topic: Check if UART write is complete?
Replies: 7
Views: 9022

Re: Check if UART write is complete?

But maybe instaed of a blocking flush() a companion to uart.any() would be better, which returns immediately with the number of bytes still to be sent. Using that, a blocking flush can be made, if needed.
by Roberthh
Wed Aug 17, 2022 8:20 pm
Forum: General Discussion and Questions
Topic: Check if UART write is complete?
Replies: 7
Views: 9022

Re: Check if UART write is complete?

no uart.flush(). There have been requests to provide an API to the esp32 wait_tx_done() function, which is the same. The implementation is basically straight forward, and will be heavily hardware dependent. It may still be, that is is easy to tell for code when the FIFO is empty, but not, whether th...
by Roberthh
Wed Aug 17, 2022 11:59 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3218786

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

As far as I could guess from the chinese Data sheet, the gxht30 seems compatible to the SHT30. if you have that sensor, just give it a try.
by Roberthh
Wed Aug 17, 2022 8:28 am
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3218786

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

###Check if shield is connected

###Read sensor status

#The status register can be cleared with

###Reset the sensor
These should work, as they just use the existing I2C exchange method. The only thing I could verify without a SHT30 was:
"Check if shield is connected".
by Roberthh
Wed Aug 17, 2022 7:01 am
Forum: General Discussion and Questions
Topic: ESP vs Pico Timer Declaration?
Replies: 3
Views: 1883

Re: ESP vs Pico Timer Declaration?

OK. so I made a PR for it, #9063, open PR no. 276.
by Roberthh
Wed Aug 17, 2022 6:25 am
Forum: General Discussion and Questions
Topic: ESP vs Pico Timer Declaration?
Replies: 3
Views: 1883

Re: ESP vs Pico Timer Declaration?

I would say that the ESP implementation misses the 'common' style, in that additional arguments can be given either at instantiating the object of in an init call. Then, it should be able to change individual properties of an object trough an init call. But there is a wild mix of behavior. For some ...
by Roberthh
Tue Aug 16, 2022 3:22 pm
Forum: Raspberry Pi microcontroller boards
Topic: Pico W Micro Python for SHT30 Temp/Humidity HELP!
Replies: 74
Views: 3218786

Re: Pico W Micro Python for SHT30 Temp/Humidity HELP!

A default address is defined in the driver. You can override this address when creating the device instance in the script using the driver. In that script, you can of course set your own default.

About the second question: You can of course use all methods provided by the SHT30 driver.
by Roberthh
Tue Aug 16, 2022 6:56 am
Forum: General Discussion and Questions
Topic: Easy way to emulate str 'capitalize' function?
Replies: 4
Views: 5327

Re: Easy way to emulate str 'capitalize' function?

Simething like: >>> s="the quick brown fox jumps over the lazy dog" >>> " ".join([w[0].upper() + w[1:] for w in s.split()]) 'The Quick Brown Fox Jumps Over The Lazy Dog' Edit: Or to exclude 1 character items from capitalization: " ".join([w[0].upper() + w[1:] if len(w) > 1 else w for w in s.split()])