Closed sfranzyshen closed 3 years ago
https://bitbucket.org/thesheep/micropython-servo/src/tip/servo.py http://docs.micropython.org/en/latest/esp8266/tutorial/pwm.html?highlight=servo#control-a-hobby-servo https://github.com/kevinmcaleer/botOS/blob/b60bbabe5fddd65e22ff6c02e735199bbca30f5a/botos/servo.py https://github.com/kevinmcaleer/botOS/blob/master/botos/servo.py
first go at the servo driver is up ... i tried to keep it as close to the arduino servo driver ... but I only included what the OttoDIY required ... no support for reading position for an example ... I tested this out using a esp8266 with the latest micropython firmware ...
>>> import servo
>>> ser = servo.Servo()
>>> ser.attach(14)
>>> ser.attached()
True
>>> ser.write(0)
>>> ser.write(90)
>>> ser.write(180)
>>> ser.detach()
>>> ser.attached()
False
first working code is up ...
servo.py for esp8266 & ESP32