From ddbcc795509bdd4957e876189577fdada0d486ac Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 1 Jan 2015 18:00:45 +0000 Subject: docs: Add quickref info about Servo; improve Servo docs. --- docs/quickref.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs/quickref.rst') diff --git a/docs/quickref.rst b/docs/quickref.rst index 5c3c7a7b2..2a1429cb0 100644 --- a/docs/quickref.rst +++ b/docs/quickref.rst @@ -48,6 +48,18 @@ See :ref:`pyb.Pin `. :: p_in = Pin('X2', Pin.IN, Pin.PULL_UP) p_in.value() # get value, 0 or 1 +Servo control +------------- + +See :ref:`pyb.Servo `. :: + + from pyb import Servo + + s1 = Servo(1) # servo on position 1 (X1, VIN, GND) + s1.angle(45) # move to 45 degrees + s1.angle(-60, 1500) # move to -60 degrees in 1500ms + s1.speed(50) # for continuous rotation servos + External interrupts ------------------- -- cgit v1.2.3