From 73c9f85b4ca10bcf8a01942e3638aa8b4331957a Mon Sep 17 00:00:00 2001 From: danicampora Date: Sun, 14 Feb 2016 13:46:04 +0100 Subject: cc3200: Simplify the Timer API and correct the documents. Make the PWM duty cycle configurable from 0.00 to 100.00 by accepting values from 0 to 10000. Add automatic Pin assignment when operating in PWM mode. --- docs/wipy/quickref.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/wipy') diff --git a/docs/wipy/quickref.rst b/docs/wipy/quickref.rst index a30eec2aa..6c2cf0de7 100644 --- a/docs/wipy/quickref.rst +++ b/docs/wipy/quickref.rst @@ -49,10 +49,10 @@ See :ref:`machine.Timer ` and :ref:`machine.Pin `. : from machine import Timer from machine import Pin - tim = Timer(1, mode=Timer.PERIODIC) + tim = Timer(0, mode=Timer.PERIODIC) tim_a = tim.channel(Timer.A, freq=1000) tim_a.time() # get the value in microseconds - tim_a.freq(1) # 1 Hz + tim_a.freq(5) # 5 Hz p_out = Pin('GP2', mode=Pin.OUT) tim_a.irq(handler=lambda t: p_out.toggle()) -- cgit v1.2.3