tingbot / tingbot-python

🔩 Python APIs to write apps for Tingbot
Other
18 stars 9 forks source link

Add long-press, down and up for buttons #23

Closed WhistleMaster closed 8 years ago

WhistleMaster commented 8 years ago

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

WhistleMaster commented 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
joerick commented 8 years ago

How did you install the new version @WhistleMaster ?

WhistleMaster commented 8 years ago

sudo pip uninstall tingbot and then sudo pip install https://github.com/tingbot/tingbot-python/zipball/master

joerick commented 8 years ago

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.

WhistleMaster commented 8 years ago

I know but the problem is not with Tide, but on the tingbot itself.

joerick commented 8 years ago

Fixed in 699c74c72fb19fc69e397a894d1bdfb7d7400904!