You may not understand what I do… but it is still awesome.

April, 2013

Python code for servoblaster

Assuming you have servoblaster working now, here is some starter code that can be used to send echo commands to the console from subprocess import call from time import sleep def stop(time): print(“stopleft”) call (["echo 0=150 > /dev/servoblaster"], shell=True) print(“stopright”) call (["echo 1=150 > /dev/servoblaster"], shell=True) sleep(time) def call_command(servo,pulsewidth): call(["echo "+str(servo)+"="+str(pulsewidth)+" > /dev/servoblaster"], shell=True) def […]