Retaliation icon indicating copy to clipboard operation
Retaliation copied to clipboard

Add code to turn on/off the LED

Open codedance opened this issue 13 years ago • 0 comments

Suggested from Mark T. Add code to turn on/off the LED. Would be good edition to the command set. i.e. warn before you're shot or powered up when it's active.

Code suggestion below. Will do this soon.

def led(cmd):

DEVICE.ctrl_transfer(0x21, 0x09, 0, 0, [0x03, cmd, 0x00,0x00,0x00,0x00,0x00,0x00])

elif command == "led":

    if value == 0:

        led(0x00)

    else:

        led(0x01)

codedance avatar Sep 22 '11 11:09 codedance