trying to use GP11 as PWM
Posted: Tue Apr 19, 2016 5:58 pm
I am trying to use GP11 as a PWM output to control a servo motor.
Based on the pinout and alternate functions table I should use alternate function 3.
So I have tried the following in the REPL
If i delete the ",alt=3" statement then the REPL is happy
Could someone please tell me what I am doing wrong, I have updated to the latest firmware on the WiPY
thanks
Steve
Based on the pinout and alternate functions table I should use alternate function 3.
So I have tried the following in the REPL
Code: Select all
>>> from machine import Pin
>>> g=Pin('GP11',mode=Pin.OUT, alt=3)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: invalid argument(s) value
>>>
Could someone please tell me what I am doing wrong, I have updated to the latest firmware on the WiPY
thanks
Steve