• One way to get a module into the espruino is to put it on a micro SD card in in node_modules directory, then load it from within the Espruino. You need to put the require command in left hand side, or on the right, you need to confuse the IDE like so:

    var d="DHT22dev"
    var dht=require(d).connect(B0)
    

    (if you do require() with a string that the IDE can't find on the website, it'll refuse to send it at the moment....)

    other way is to do:

    modules.addCached("modulename","module source code goes here");

    I think a way to set a local directory to look for modules in is planned

About

Avatar for DrAzzy @DrAzzy started