# Test pin 13 with a button and pulldown resistor.
# Press the pause button to see which pins
# are pulldown and which are pullup.
#
# Pin 13 seems to be special. It has a internal pullup enabled.
# With an external pulldown, there is a conflict.
#
# Note: This is with the older "wokwi-esp32-devkit-v1"
# A new project starts with v4.
from machine import Pin
from time import sleep
print('Hello')
led_1 = Pin(18, Pin.OUT)
led_2 = Pin(5, Pin.OUT)
push_button_1 = Pin(13, Pin.IN)
push_button_2 = Pin(25, Pin.IN)
while True:
logic_state_1 = push_button_1.value()
if logic_state_1 == True:
led_1.value(1)
else:
led_1.value(0)
logic_state_2 = push_button_2.value()
if logic_state_2 == True:
led_2.value(1)
else:
led_2.value(0)
sleep(0.1)