-
Notifications
You must be signed in to change notification settings - Fork 29
lack of was_touched for pin_logo makes it less useful as a 'third button' #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I don't recall there being a specific reason why The rational at the time was to implement
So if we'd like to implement this it would have to be by adding a |
I'm fully supportive of adding was_touched to all pins, including the logo, unless it presents significant size or performance issues on V1/V2. |
For V1 this should be straightforward, because all the code is already there to debounce touch and compute the "was touched" state. It just has to be wired up for P0/P1/P2. For V2 it depends on the CODAL. The logo should work fine because |
I assume we also want to implement |
Yes, for symmetry we should add Edit: Just saw the comment in lancaster-university/codal-microbit-v2#251 (comment) 👍 |
|
CODAL as at v0.2.63 has added the |
Pins with these new methods are: pin0, pin1, pin2, pin_logo. Fixes issue #149. Signed-off-by: Damien George <[email protected]>
For |
The only thing left to close this task is implementing this in CODAL and revert 3074c81: |
Is there user feedback on this? I wanted to implement a touch and measure how long the logo was pressed for and did this with |
For the buttons we can easily write code that's not super time-dependent wrt things happening in the main loop, by using
was_pressed
. However, with the pin_logo, as far as I can see can only test whether itis_touched
.I wouldn't be against having a was_pressed for all touch pins, either. Does anyone recall the reason for not having
was_
methods for pins?The text was updated successfully, but these errors were encountered: