You are reading a single comment by @bigplik and its replies.
Click here to read the full conversation.
-
var SWBtn = require("https://raw.githubusercontent.com/muet/EspruinoDocs/master/modules/SWButton.js"); var mySWBtn = new SWBtn(function(k){ console.log("BTN1 detected " + k); // log key press pattern if (k === "L" ) { LED1.set(); } else if (k === "LS" ) { LED1.reset(); } else if (k === "LL" ) { LED2.set(); } else if (k === "LLS") { LED2.reset(); } });
could anyone explain how to change default button pin?
Yes... but I posted on there twice asking if the webpage that goes with it could be fixed - no reply yet :)
@allObjects would you mind fiddling with the documentation file?
For now, it can be used with: