Skip to content

Commit 8eb7165

Browse files
Docs for touch_calibrate() in MicroBitTouchPin
To match bbcmicrobit/micropython@b2a0dc9
1 parent 2e7ae05 commit 8eb7165

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lang/en/typeshed/stdlib/microbit/__init__.pyi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,15 @@ class MicroBitTouchPin(MicroBitAnalogDigitalPin):
273273

274274
CAPACITIVE: int
275275
RESISTIVE: int
276+
def touch_calibrate(self) -> None:
277+
"""Re-calibrates the touch pin detection.
278+
279+
Example: ``pin0.touch_calibrate()``
280+
281+
This is useful when a conductive object is connected to the pin to be used as a touch sensor.
282+
"""
283+
...
284+
276285
def is_touched(self) -> bool:
277286
"""Check if the pin is being touched.
278287

0 commit comments

Comments
 (0)