Skip to content

Instantly share code, notes, and snippets.

@neosarchizo
Created August 5, 2022 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neosarchizo/c6e6de698cb7e1342c1d456c9efea874 to your computer and use it in GitHub Desktop.
Save neosarchizo/c6e6de698cb7e1342c1d456c9efea874 to your computer and use it in GitHub Desktop.
MicroPython - ESP32 PWM 제어
from machine import Pin, PWM
from time import sleep
while True:
pwm = PWM(Pin(25), freq=200, duty=512)
sleep(1)
pwm.freq(400)
sleep(1)
pwm.freq(600)
sleep(1)
pwm.freq(800)
sleep(1)
pwm.freq(1000)
sleep(1)
pwm.deinit()
sleep(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment