Skip to content

Instantly share code, notes, and snippets.

@charlesreid1
Created July 10, 2014 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charlesreid1/47b086611eea6041ac3e to your computer and use it in GitHub Desktop.
Save charlesreid1/47b086611eea6041ac3e to your computer and use it in GitHub Desktop.
trigger gc code
def Trigger_GC():
import serial
import time
GC_Trigger_Port = serial.Serial(12,9600,timeout = 1)
bytesEnable = bytearray([254, 248])
bytesOn = bytearray([254, 1])
bytesOff = bytearray([254, 0])
GC_Trigger_Port.write(bytesEnable)
GC_Trigger_Port.write(bytesOn)
time.sleep(2)
GC_Trigger_Port.write(bytesOff)
GC_Trigger_Port.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment