Skip to content

Commit

Permalink
Changed toggle() to value()
Browse files Browse the repository at this point in the history
The function toggle() is not universal, the ESP32 cannot use it.
  • Loading branch information
FunDeckHermit authored Jan 27, 2025
1 parent eb4ddf0 commit ce85229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pin = Pin("LED", Pin.OUT)
print("LED starts flashing...")
while True:
try:
pin.toggle()
pin.value(not pin.value())
sleep(1) # sleep 1sec
except KeyboardInterrupt:
break
Expand Down

0 comments on commit ce85229

Please sign in to comment.