Created
September 21, 2017 09:55
-
-
Save simform-solutions/c076227725c51061f0b3128c83564839 to your computer and use it in GitHub Desktop.
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
#execute command according to transaction tag | |
#To turn on led use this command TURNONLED999999999999999999 | |
#To turn off led use this command TURNOFFLED99999999999999999 | |
#To rotate servo motor use this command TURNONSERVO9999999999999999 | |
def execute_command(command): | |
print("Transaction tag: " + command) | |
if command == 'TURNONLED': | |
blink_led(True) | |
elif command == 'TURNOFFLED': | |
blink_led(False) | |
elif command == 'TURNONSERVO': | |
rotate_motor() | |
else: | |
print("Unsupported action") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment