bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
602 stars 284 forks source link

docs: Add `was_touched` & `touch_calibrate` for pins 0, 1, 2 & `pin_logo`. #802

Open microbit-carlos opened 7 months ago

microbit-carlos commented 7 months ago

Preview: https://microbit-micropython--802.org.readthedocs.build/en/802/pin.html#microbit.MicroBitTouchPin

microbit-carlos commented 7 months ago

Also took the opportunity to move the explanation of capacitive/resistive touch modes from is_touched() to set_touch_mode() and remove the duplicated note:

Before After
image image
dpgeorge commented 5 months ago

Also took the opportunity to move the explanation of capacitive/resistive touch modes from is_touched() to set_touch_mode() and remove the duplicated note:

Yes, that's a good clean up.

microbit-carlos commented 2 weeks ago

As well keep this PR unmerged until the next MicroPython v2 beta is released, and this PR already touches the pin page, I've also added here the touch_calibrate() method.