You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The uBit object already constructs these with the appropriate defaults, but there should be a way to switch them over to the other modes. This is done in CODAL by calling isTouched() with an argument to determine the mode
Activity
jaustin commentedon Nov 13, 2020
The uBit object already constructs these with the appropriate defaults, but there should be a way to switch them over to the other modes. This is done in CODAL by calling isTouched() with an argument to determine the mode
https://github.com/lancaster-university/codal-nrf52/blob/master/source/NRF52Pin.cpp#L520
Here's usage in MakeCode...
https://github.com/microsoft/pxt-microbit/blob/master/libs/core/touchmode.cpp#L40
Pins that can have their touchmode changed
(this list is defined by the hardware because these pins have 10M pullups that make the resistive mode work)
logo
is it's own class with only `is_touched()' so that needs extending, as do pin0,1,2Proposed Python API:
dpgeorge commentedon Dec 21, 2020
pin.set_touch_mode(mode)
method and corresponding constants were added in cbc3cfcmicrobit-carlos commentedon Dec 21, 2020
Gave this a test and all looks good, thanks Damien!