set mpr121 thresholds
This commit is contained in:
parent
1323f7ea75
commit
8f2878aade
1 changed files with 2 additions and 0 deletions
|
|
@ -40,6 +40,8 @@ class UI extends EventEmitter {
|
||||||
const MPR121 = require('mpr121'),
|
const MPR121 = require('mpr121'),
|
||||||
mpr121 = new MPR121(0x5A, 1);
|
mpr121 = new MPR121(0x5A, 1);
|
||||||
|
|
||||||
|
mpr121.setThresholds(16, 12);
|
||||||
|
|
||||||
mpr121.on('touch', (pin) => {
|
mpr121.on('touch', (pin) => {
|
||||||
if(pin === 0) this.skip();
|
if(pin === 0) this.skip();
|
||||||
if(pin === 1) this.pause();;
|
if(pin === 1) this.pause();;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue