adafruit / adafruit/node_mpr121

setThresholds doesn't do anything

Open
#4 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
11
Forks
6
PR merge metrics
No merged PRs in 30d

Description

If I run the following code:

```javascript
mpr121.setThresholds(200, 190)
.then(function() {
mpr121.on('touch', function(pin) {
console.log(`Touch on ${pin}`);
});
});
```

then it doesn't matter what I set the two thresholds to, it will be just as sensitive as the defaults.

If I go into the library and change the defaults (12 and 6) to the numbers I want, then the thresholds actually change.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the setThresholds entry point and compare how its arguments are handled with the library defaults of 12 and 6. Reproduce the provided JavaScript example, then verify that changing the arguments alters touch sensitivity rather than requiring the defaults to be edited.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js, raspberry-pi
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.