-
Notifications
You must be signed in to change notification settings - Fork 646
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
PINs set to Capacitive Mode last don't wont (excluding P0) #6072
Comments
Sorry, I don't understand. |
Ok, if I use LED blocks for the pin presses, this bug doesn't happen. |
@maybdev @microbit-carlos @abchatra It seems to have always been the case, back to MakeCode v3. In this example, P2 works until button A is pressed. |
rest for 1 beat breaks it too In fact it seems any digital/analogue read/write of P0 or P1 breaks P2 touch. I can repeat that in C++. @maybdev The tones example can work with the audio pin disabled |
@abchatra looks like this is a valid issue in CODAL which is exposed in MakeCode. Up to you if you prefer to keep this close or re-open it until it is resolved. |
Lets close this and track in codal repo. |
My Problem
On my micro:bit v2.21, when I set all my pins to Capacitive Mode, the last one that has been set doesn't get detected with the
pin_is_pressed
function. But if P0 is the last one set to Capacitive, then they all work (including P0).How To Reproduce
In this code, when loaded onto my micro:bit, when I touch P0, then it rings tone 440, if I touch P1, it rings tone 494, but if I touch P2, then nothing will happen. At the very top of the code, if you change P1 to be set to Capacitive last, then P2 will work and ring tone 523, but P1 wont work at all, and if you change P0 to be set to Capacitive last, then ALL the pins will work properly!
More Info
If I use the
on_pin_pressed
function then all pins will work properly no matter to order of setting, but if theon_pin_pressed
function AND thepin_is_pressed
function are used at the same time, then the last pin set to Capacitive Mode (excluding P0) will neither work withon_pin_pressed
ORpin_is_pressed
.And the bug only occurs on my micro:bit and not in the simulator.
The text was updated successfully, but these errors were encountered: