You are reading a single comment by @myxor and its replies. Click here to read the full conversation.
  • Is it possible to somehow use a puck.js v2.1 as a reed switch?

    Documenation says that it is not possible with version 2.1: https://www.espruino.com/Puck.js#magnetometer

    Puck.js v2 only You can use the puckjsv2-mag-level (About Modules) module to configure the Puck.js magnetometer for ultra low power mode (40uA) while acting like a reed switch (detecting when field strength is high or low). This will not currently work on Puck.js v2.1

    I tried it with my 2.1 puck.js and it indeed does not work:

    Uncaught Error: Puck.js v2 required for this module
    at line 1 col 78
    ...2 required for this module");var e;exports.on=function(c){c=...
    Uncaught TypeError: First argument to EventEmitter.on(..) must be a string
    at line 2 col 34
    require("puckjsv2-mag-level").on();

    Any way to get this working?

About

Avatar for myxor @myxor started