mirror of
https://github.com/micropython/micropython.git
synced 2025-09-05 17:30:41 +02:00
14 lines
260 B
Python
14 lines
260 B
Python
# check basic functionality of the timer class
|
|
|
|
import pyb
|
|
from pyb import Timer
|
|
|
|
tim = Timer(4)
|
|
tim = Timer(4, prescaler=100, period=200)
|
|
print(tim.prescaler())
|
|
print(tim.period())
|
|
tim.prescaler(300)
|
|
print(tim.prescaler())
|
|
tim.period(400)
|
|
print(tim.period())
|