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. It does not store any personal data.Import Tkinter as tk from gattlib import DiscoveryService from gattlib import GATTRequester from time import sleep def run (): global button_run button_run. The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. The cookie is used to store the user consent for the cookies in the category "Performance". 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. Necessary cookies are absolutely essential for the website to function properly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |