How to install Microlattice.js lib

Use ml-gpio for an example:

  • npm install ml-gpio. (ml-gpio is microlattice.js gpio lib)
  • Edit your featureConfig.json , and add "ml-gpio": true
  • Edit your index.js
__pinmux(36, 8);  //regist 36 to gpio mode
var status = 0;

setInterval(function() {
    __gpioWrite(36, status);
    if (status === 0) {
        status = 1;
    } else {
        status = 0;
    }
}, 1000);

results matching ""

    No results matching ""