BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Controlling a servo motor with Blynk

I want to control a servo motor with a raspberry pi and Blynk. I’ve already created the code to control the servo with python. Where do I go from there? How do I connect the code I currently have to Blynk?

Have you tried here:

Pete.

@blynk.handle_event(‘write V0’)
def write_virtual_pin_handler(pin, value):
print(WRITE_EVENT_PRINT_MSG.format(pin, value))
servo.duty(int(value[0]))