Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import serial
import requests
from datetime import datetime, timedelta
import time
serial_port = '/dev/ttyUSB0'
ser = serial.Serial(serial_port, 9600, timeout=1)
def demo():
ser.write('0,0,135\n')
time.sleep(1)
ser.write('0,1,90\n')
time.sleep(1)
ser.write('0,2,50\n')
demo()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.