Closed WhistleMaster closed 8 years ago
I've updated to the new API with the new button functions but I've the following error:
Traceback (most recent call last):
File "main.py", line 6, in <module>
@left_button.press
NameError: name 'left_button' is not defined
How did you install the new version @WhistleMaster ?
sudo pip uninstall tingbot
and then
sudo pip install https://github.com/tingbot/tingbot-python/zipball/master
Tide.app actually has a bundled version of the python-tingbot libraries, so the system-installed version isn't used. You could run the app in the terminal by cd'ing into the .tingapp folder and doing python main.py
. Or, you can 'vendor' the tingbot libraries by dragging the tingbot
folder of the latest version into the Tide sidebar.
I know but the problem is not with Tide, but on the tingbot itself.
Fixed in 699c74c72fb19fc69e397a894d1bdfb7d7400904!
Handling long-press, down and up on buttons.
This could be done in
platform_specific
files.Then, you can implemente something like
@button.longpress('left')
Example of implementation here -> https://github.com/akhepcat/pygpiod/blob/master/pygpiod