Search found 2008 matches

by Roberthh
Mon Jul 06, 2020 4:49 pm
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 109

Re: PIN latch functionality for ESP32

I agree, that specifying the hold function with the pull keyword is misleading. The pull option and the hold option are completely separate topics. so maybe adding a hold keyword may be better - or the hold method. Edit: I wonder why it work at your site with rtc_gpio_hold_en. In my test, both calls...
by Roberthh
Mon Jul 06, 2020 4:43 pm
Forum: Development of MicroPython
Topic: problems compiling Micropython under WLS
Replies: 2
Views: 19

Re: problems compiling Micropython under WLS

The gettext module for the build environment is missing.

I'm not sure if it works in WSL, but you could try:

apt-get install gettext-base

P.S.: The separate step "make submodules" is not required any more, but does not hurt.
by Roberthh
Mon Jul 06, 2020 3:59 pm
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 109

Re: PIN latch functionality for ESP32

Once PULL_HOLD is called, the output does not change any more. So I used the sequence: led_pin = Pin(2, Pin.OUT) led_pin.on() # or led_pin(1) led_pin.init(Pin.OUT, pull=Pin.PULL_HOLD) Unfortunately, the ESP32 port does not have the single pin.pull() method. Edit: I use a Wemos board, but the chips a...
by Roberthh
Mon Jul 06, 2020 11:50 am
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 109

Re: PIN latch functionality for ESP32

@ PRosenb: Finally using the option pull=Pin.PULL_HOLD with the existing firmware will offer you the in intended function of keeping the value of an output Pin during machine.deepsleep and machine.reset. It also prevents the redefinition of a PIN to input mode until the hold is released with pull=No...
by Roberthh
Mon Jul 06, 2020 9:10 am
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 109

Re: PIN latch functionality for ESP32

So I made a test implementation of pin.hold(). Not a lot of work for coding. Testing takes longer. It works, but I see no difference to the pull=Pin.PULL_HOLD option of Pin.init(). In both cases, the value of the output is frozen and maintained during a machine.deepsleep() or machine.reset() call. A...
by Roberthh
Mon Jul 06, 2020 5:53 am
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 109

Re: PIN latch functionality for ESP32

It is not a problem if only the ESP32 supports it. There are many other examples of hardware-specific functions in MicroPython, which are not supported by every port. For instance WiFi. I understand why that is useful, so there are good reasons for implementing it. Whether I will implement it ... do...
by Roberthh
Mon Jul 06, 2020 5:30 am
Forum: Programs, Libraries and Tools
Topic: Cannot find I2C devices on ESP32
Replies: 3
Views: 48

Re: Cannot find I2C devices on ESP32

The code looks OK. So you should check the wiring (4 wires: Vcc, GND, scl, sda), whether the wires are not broken and the assignment to sda and scl.
by Roberthh
Mon Jul 06, 2020 5:26 am
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 109

Re: PIN latch functionality for ESP32

No, it is not. PULL_HOLD activates a function, which freezes the state of a PIN, such that it will not be modified any more by changing input value in input mode or by writing to the pin in output mode. I can imagine why that is useful input mode, but not for output mode.
by Roberthh
Sun Jul 05, 2020 3:55 pm
Forum: ESP32 boards
Topic: Single interrupt trigger performing callback function several times.
Replies: 1
Views: 32

Re: Single interrupt trigger performing callback function several times.

Two possible reasons for that: a) bouncing of the input signal, if that comes from a switch. There are lots of discussions in this forum about de-bouncing. b) false triggers due to slow slope of the input signal. That happens with the ESP32. Either increase the slope of the signal, or use the de-bou...
by Roberthh
Sun Jul 05, 2020 1:57 pm
Forum: Development of MicroPython
Topic: PIN latch functionality for ESP32
Replies: 12
Views: 109

Re: PIN latch functionality for ESP32

In the close related Pycom dialect this method is called hold() with the argument True and False. So pin.hold(True) enables it, pin.hold(False) disables it. For consistency, this name should be used.