nrf5/modules: Adding a python test file with function to dim a specific led (17).

This commit is contained in:
Glenn Ruben Bakke 2016-12-20 23:21:17 +01:00
parent 0999226103
commit 2db3f0deb7

10
nrf5/modules/test.py Normal file
View File

@ -0,0 +1,10 @@
import time
from machine import PWM
def pulse():
for i in range(0, 101):
p = PWM(0, pin=17, freq=50, duty=i, period=16000)
time.sleep_ms(10)
for i in range(0, 101):
p = PWM(0, pin=17, freq=50, duty=100-i, period=16000)
time.sleep_ms(10)