Created
November 29, 2011 16:15
-
-
Save sasimpson/1405374 to your computer and use it in GitHub Desktop.
python to send proper hex to arduino program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def color_bulb(s, bulb, i, rgb): | |
req = "2E %02X %s %02X %02X %02X" % (bulb, i, rgb[0], rgb[1], rgb[2]) | |
print req | |
s.write(binascii.unhexlify(''.join(req.split()))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment