Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code to turn on/off the LED #1

Open
codedance opened this issue Sep 22, 2011 · 0 comments
Open

Add code to turn on/off the LED #1

codedance opened this issue Sep 22, 2011 · 0 comments

Comments

@codedance
Copy link
Owner

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant