We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related: microsoft/pxt-microbit#6072
With the sample below, P2 touch works until button A is pressed/
I suspect this line needs a "-1". I'll test and make a PR. https://github.com/lancaster-university/codal-core/blob/master/source/drivers/TouchSensor.cpp#L111
#include "MicroBit.h" MicroBit uBit; void onButtonA(MicroBitEvent e) { uBit.io.P0.setDigitalValue(0); } void forever() { while (true) { if ( uBit.io.P0.isTouched()) uBit.display.print('0'); else if ( uBit.io.P1.isTouched()) uBit.display.print('1'); else if ( uBit.io.P2.isTouched()) uBit.display.print('2'); else uBit.display.clear(); uBit.sleep(100); } } int main() { uBit.init(); uBit.messageBus.listen( MICROBIT_ID_BUTTON_A, MICROBIT_BUTTON_EVT_CLICK, onButtonA); uBit.io.P0.isTouched( codal::TouchMode::Capacitative); uBit.io.P1.isTouched( codal::TouchMode::Capacitative); uBit.io.P2.isTouched( codal::TouchMode::Capacitative); create_fiber( forever); release_fiber(); return 0; }
The text was updated successfully, but these errors were encountered:
PR lancaster-university/codal-core#179
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Related: microsoft/pxt-microbit#6072
With the sample below, P2 touch works until button A is pressed/
I suspect this line needs a "-1". I'll test and make a PR.
https://github.com/lancaster-university/codal-core/blob/master/source/drivers/TouchSensor.cpp#L111
The text was updated successfully, but these errors were encountered: