Update timer tests example.

This commit is contained in:
iabdalkader 2020-12-04 01:00:00 +02:00
parent 9c5a15973a
commit 55366647ff

View File

@ -15,8 +15,7 @@ print("")
for i in range(1, 18): for i in range(1, 18):
try: try:
print("Testing TIM%d... "%(i), end="") print("Testing TIM%d... "%(i), end="")
tim = Timer(i, freq=10) # create a timer object using timer 4 - trigger at 1Hz tim = Timer(i, freq=10, callback=tick)
tim.callback(tick) # set the callback to our tick function
time.sleep_ms(1000) time.sleep_ms(1000)
tim.deinit() tim.deinit()
except ValueError as e: except ValueError as e: