Search found 141 matches

by MostlyHarmless
Fri Jan 17, 2020 3:52 pm
Forum: Development of MicroPython
Topic: drivers/dht improvements (take 2)
Replies: 19
Views: 649

Re: drivers/dht improvements (take 2)

I would move the await asyncio.sleep(2) after the print() ... So you will get the temperature directly after start ;) From a cold boot the DHT sensor needs some time to stabilize and become ready. If you try to query it too soon after power on all you get is a ETIMEDOUT. You might be able to move t...
by MostlyHarmless
Fri Jan 17, 2020 1:30 pm
Forum: Development of MicroPython
Topic: drivers/dht improvements (take 2)
Replies: 19
Views: 649

Re: drivers/dht improvements (take 2)

The AM2320 is an upgrade of the DHT22 / AM2302, and it supports both the old 1-wire interface and I2C. https://github.com/mcauser/micropython-am2320 Same goes for the tiny DHT12, which is an upgrade of the DHT11, and adds I2C too. https://github.com/mcauser/micropython-dht12 These could do with som...
by MostlyHarmless
Fri Jan 17, 2020 1:17 pm
Forum: Pyboard D-series
Topic: Pyboard D RTC accuracy
Replies: 5
Views: 127

Re: Pyboard D RTC accuracy

Have you considered submitting a PR? I have. There is one small problem left with it that I still haven't figured out how to minimize. The whole thing is obviously based on two while() loops, the first waiting as long as both pins are unequal the requested levels, the second waiting until both are ...
by MostlyHarmless
Fri Jan 17, 2020 1:02 pm
Forum: Development of MicroPython
Topic: drivers/dht improvements (take 2)
Replies: 19
Views: 649

Re: drivers/dht improvements (take 2)

There is nothing wrong with wait_ms = d.start() await asyncio.sleep_ms(wait_ms) d.receive() however if I were writing the device driver I'd either provide an awaitable receive method so you could write await d.receive() or make the class an awaitable class. Then you'd just have await d Either appro...
by MostlyHarmless
Thu Jan 16, 2020 10:27 pm
Forum: General Discussion and Questions
Topic: Target audience for MicroPython?
Replies: 62
Views: 4148

Re: Target audience for MicroPython?

stijn wrote:
Tue Mar 26, 2019 8:27 am
- use WSL, build hower you want (probably the least qualified as 'build on windows' given what WSL is)
The least qualified would be to install VMware or similar, create a Linux VM and build inside of that. But it does work great.
by MostlyHarmless
Thu Jan 16, 2020 9:43 pm
Forum: General Discussion and Questions
Topic: Partial mac address ?
Replies: 4
Views: 74

Re: Partial mac address ?

cgglzpy wrote:
Thu Jan 16, 2020 7:22 pm
Hi, just mention that MicroPython introduced a separator option for binascii.hexlify function ...
Neat, thanks!
by MostlyHarmless
Thu Jan 16, 2020 6:35 pm
Forum: Pyboard D-series
Topic: Pyboard D RTC accuracy
Replies: 5
Views: 127

Re: Pyboard D RTC accuracy

Note that the DS3231 has an "aging" register that can be used to adjust the TCXO slightly. The register is a signed 8-bit value and controls a capacitor array that is part of the crystal's load capacitance. The DS3231 documentation states that one LSB of the register equals approximately 0.1ppm spee...
by MostlyHarmless
Thu Jan 16, 2020 5:58 pm
Forum: General Discussion and Questions
Topic: Partial mac address ?
Replies: 4
Views: 74

Re: Partial mac address ?

The dollar sign at the beginning is one byte, the 'b' the second, followed by four bytes that don't have a corresponding ascii character and are therefore displayed in their \x representation.


Regards, Jan
by MostlyHarmless
Wed Jan 15, 2020 1:16 am
Forum: Drivers for External Components
Topic: Large color LCD?
Replies: 9
Views: 198

Re: Large color LCD?

Your idea could work. You may find someone has written a VT100 emulator for the Pi, and you can access it from the Pyboard via a UART. You'd need to deal with the VT100 editing commands. Oh ... you are thinking of emulating a full VT100 via UART? With all of the functionality described in termcap? ...
by MostlyHarmless
Tue Jan 14, 2020 9:40 pm
Forum: ESP32 boards
Topic: asynycio as_GPS
Replies: 34
Views: 638

Re: asynycio as_GPS

KeyboardInterrupt is a standard Python exception class.

In your case a construct like this should work:

Code: Select all

while True:
    try:
        do_your_gps_stuff_here
    except KeyboardInterrupt:
        break