I want to read digital state at Pin 15, but it is always 1, although there is fresh flashed firmware (esp32-idf3-20191220-v1.12 and also esp32-idf3-20200902-v1.13).
The code is very simple:
Pins 2 and 15 are not connected, but the LED is on (and should not be). I tried with both of this firmwares (both are stable versions). And I tried with two different devices. The result is the same. What's the problem?
Code: Select all
from machine import Pin from time import sleep led = Pin(2, Pin.OUT) button = Pin(15, Pin.IN) while True: button_state = button.value() led.value(button_state) sleep(0.1)