Created
August 5, 2022 05:01
-
-
Save neosarchizo/c6e6de698cb7e1342c1d456c9efea874 to your computer and use it in GitHub Desktop.
MicroPython - ESP32 PWM 제어
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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