Servo library

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Posts: 17
Joined: Sat Jul 23, 2016 7:30 pm

Re: Servo library

Post by mflmartin » Mon Jan 02, 2017 11:44 am

pythoncoder wrote:An easy way might be to use a standard 180 degree servo and gear it up 2:1. The only snag is that at (say) 11.59 the clock's hand would sweep through 354 degrees backwards to get to 12.00.
Thanks... But that is not an option, due to the "aesthetics" of the movement. I want seamless analog like movement. But your suggestions is a way, for sure. Thanks!

Sent from my iPhone using Tapatalk

User avatar
Posts: 3214
Joined: Fri Jul 18, 2014 8:01 am
Location: UK

Re: Servo library

Post by pythoncoder » Mon Jan 02, 2017 1:46 pm

Fair enough, in which case I'd go for stepper motors.
Peter Hinch

User avatar
Posts: 3017
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada

Re: Servo library

Post by dhylands » Fri Jan 06, 2017 7:45 am

You can also setup the PWM yourself.

For example, this code:

Code: Select all

servo_pin = pyb.Pin.board.X1
t5 = pyb.Timer(5, prescaler=83, period=19999);
servo =, pyb.Timer.PWM, pin=servo_pin)
allows 1 usec resolution on the pulse width. The regular servo library only allows 10 usec resolution.

Posts: 1
Joined: Sat Jun 16, 2018 12:17 pm

Re: Servo library

Post by othoma » Sat Jun 16, 2018 12:19 pm

Hello, has anyone tested the library on ESP32 ?

I have some trouble to make it work.

Post Reply