microsoft / microsoft/pxt-microbit
Expose touch sensor calibration functions (in an extension?)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 721
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 2
Description
Is your feature request related to a problem? Please describe.
The micro:bit touch pins can be calibrated https://github.com/lancaster-university/codal-core/blob/master/inc/drivers/TouchButton.h#L88 - this is great for when you've connected something (like copper tape) to the edge connector etc.
At the moment we used a fixed calibration for the TouchButton thresholds and while that's simple, it stops working once you connect some things to the edge connector.
Describe the solution you'd like
I'd like to have a way to trigger calibration of the touch sensing functions. I don't know whether it needs to be per-pin or for all pins at once.
It could be an extensions, or a new block. I would lean in favour of making it an extension first.
Describe alternatives you've considered
Alternatives are using the old 'resistive touch' options but this requires two contact points.
Additional context
This is V2 only.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the calibration API in codal-core's inc/drivers/TouchButton.h and determine how V2 touch pins expose calibration. Compare whether an extension or a new block should provide per-pin or all-pin calibration, then verify the chosen interface works with edge-connector additions on V2 hardware.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100