

This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. The cookies is used to store the user consent for the cookies in the category "Necessary". The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". The cookie is used to store the user consent for the cookies in the category "Analytics". These cookies ensure basic functionalities and security features of the website, anonymously. When press the connect button, use DiscoveryService to get all available devices and use GATTRequester to connect the device.Necessary cookies are absolutely essential for the website to function properly. Button ( root, text = 'Stop motor', width = BUTTON_WIDTH, command = stop, state = 'disabled' ) button_stop. Button ( root, text = 'Speed down', width = BUTTON_WIDTH, command = down, state = 'disabled' ) button_down. Button ( root, text = 'Speed up', width = BUTTON_WIDTH, command = up, state = 'disabled' ) button_up. Button ( root, text = 'Run motor', width = BUTTON_WIDTH, command = run, state = 'disabled' ) button_run. Button ( root, text = 'Disconnect Smart Hub', width = BUTTON_WIDTH, command = disconnect, state = 'disabled' ) button_disconnect.

Button ( root, text = 'Connect Smart Hub', width = BUTTON_WIDTH, command = connect ) button_connect. Label ( root, fg = "dark green", text = 'N/A' ) label. title ( "Lego Wedo 2.0 Motor Control" ) label = tk. after ( DELAY, motor_up ) def down (): global button_down button_down. after ( DELAY, smart_hub_disconnect ) def up (): global button_up button_up. after ( DELAY, smart_hub_connect ) def disconnect (): global button_disconnect button_disconnect. after ( DELAY, motor_stop ) def connect (): global button_disconnect button_disconnect. after ( DELAY, motor_run ) def stop (): global button_stop button_stop. Import Tkinter as tk from gattlib import DiscoveryService from gattlib import GATTRequester from time import sleep def run (): global button_run button_run.
