Created
October 7, 2018 07:23
-
-
Save boochow/1303fd200544f16ebc781041e6ef8ba7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 time import sleep_ms | |
def test(): | |
p=PWM(0, pin=18, ms=MS_ENABLE) | |
p.freq(1000) | |
p.range(DEFAULT_RANGE) | |
while True: | |
for i in range(DEFAULT_RANGE // 2): | |
p.data(i) | |
sleep_ms(1) | |
for i in range(DEFAULT_RANGE // 2 - 1, 0, -1): | |
p.data(i) | |
sleep_ms(1) | |
test() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment