Search found 18 matches

by jdts
Sun May 17, 2020 7:05 pm
Forum: ESP32 boards
Topic: ESP32 Virtual Timers??
Replies: 2
Views: 107

Re: ESP32 Virtual Timers??

>>> os.uname() (sysname='esp32', nodename='esp32', release='1.12.0', version='v1.12-35-g10709846f on 2019-12-29', machine='ESP32 module with ESP32') Yes you can run one timer callback, but the example has two calls with a virtual timer. You never see the "1", since the 2nd overwrites the first, as ...
by jdts
Sun May 17, 2020 4:00 am
Forum: ESP32 boards
Topic: ESP32 Virtual Timers??
Replies: 2
Views: 107

ESP32 Virtual Timers??

Does MP actually support virtual timers on ESP32? The documentation sure claims so, but the example given to demonstrate it doesn't even run correctly, and:

Code: Select all

>>> Timer(-1)==Timer(-1)
True
by jdts
Sat May 16, 2020 12:54 pm
Forum: ESP32 boards
Topic: Using TX/RX as GPIO ok?
Replies: 0
Views: 120

Using TX/RX as GPIO ok?

Is there any harm in using ESP32's TX/RX (GPIO 1/3) as GPIO OUT pins, other than losing serial access through UART0? I'm adapting to an older motor shield that uses these pins for motor control. I can still use utelnetserver (with `dupterm_notify` commented back in ) to access the console. Outside o...
by jdts
Sun Jan 05, 2020 6:00 pm
Forum: General Discussion and Questions
Topic: dict.keys() does not behave as set
Replies: 4
Views: 383

Re: dict.keys() does not behave as set

Thanks. I checked the known diffs and didn't see anything relevant.
by jdts
Sat Jan 04, 2020 9:06 pm
Forum: Other Boards
Topic: [TinyPICO/ESP32] TinyPICO is live and available for purchase!
Replies: 7
Views: 1376

Re: [TinyPICO/ESP32] TinyPICO is live and available for purchase!

Just came across tinyPico and looks like a very capable board! BTW, for those concerned about the price, try to find a board of any size with 4MiB PSRAM: >$15-20 shipped is typical. I was surprised to see that only 2 ADC1 pins were included, since ADC2 is unusable when WiFi is on, and ADC2 control i...
by jdts
Sat Jan 04, 2020 5:03 pm
Forum: General Discussion and Questions
Topic: dict.keys() does not behave as set
Replies: 4
Views: 383

dict.keys() does not behave as set

I was surprised that the keys of a dict are not treated as an &'able set in µPy: >>> d={"foo":1,"bar":2,"baz":3} >>> type(d.keys()) <class 'dict_view'> >>> d.keys() & {'baz','foo','faz'} Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported types for __and__: ...
by jdts
Tue Dec 31, 2019 7:01 pm
Forum: ESP32 boards
Topic: V1.12 Wifi Connection Failures
Replies: 2
Views: 246

Re: V1.12 Wifi Connection Failures

Update to followup: Resetting my router fixed the issue, which had persisted for about 24hrs. Kind of alarming that an ESP32 can give a router such conniptions. I had even reset the ARP cache on the router. If you encounter something similar, try power-cycling your router.
by jdts
Tue Dec 31, 2019 6:46 pm
Forum: ESP32 boards
Topic: V1.12 Wifi Connection Failures
Replies: 2
Views: 246

Re: V1.12 Wifi Connection Failures

Quick follow-up: "Reason: 8" comes from my "wlan.active(False)" statement after failure to connect is detected. If I remove that, the logs are much less revealing: connecting to network... I (1232) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0 I (1232) wifi: mode : sta (a4:cf:12:9a:67...
by jdts
Tue Dec 31, 2019 6:34 pm
Forum: ESP32 boards
Topic: V1.12 Wifi Connection Failures
Replies: 2
Views: 246

V1.12 Wifi Connection Failures

My esp32 wifi connection is now quite flaky after upgrading to v1.12. Sometimes connection works, sometimes not. Failure usually looks like a CONNECTED status followed quickly by STA_DISCONNECTED: I (48672) network: event 3 connecting to network [9]... I (49692) wifi: mode : sta (a4:cf:12:9a:67:e4) ...
by jdts
Tue Dec 31, 2019 4:09 am
Forum: General Discussion and Questions
Topic: MicroPythonic way to non-blocking read a character from the serial USB port
Replies: 7
Views: 607

Re: MicroPythonic way to non-blocking read a character from the serial USB port

So:

Code: Select all

import sys,uselect
spoll=uselect.poll()
spoll.register(sys.stdin,uselect.POLLIN)
def read1():
    return(sys.stdin.read(1) if spoll.poll(0) else None)