• Sun 2018.11.11

    Reading over:


    I would like to do the same using both the Pixl and MDBT42Q.

    Of course I had to try, can see the paired Pixl, but am greeted with (which makes sense of course) error:

    'Unable to decode "Uncaught ReferenceError:\"Puck\" is not defined',
    got SyntaxError: Unexpected token U in JSON at position 0

    Not able to locate a suitable tutorial.

    If there currently isn't an equivalent, what might the expected deployment date time frame be?

  • You just use exactly the same code. The puck.js library works fine on any Bluetooth Espruino.

    If you tried the first example on https://www.espruino.com/Puck.js+Web+Blu­etooth that'd have worked just fine.

    The issue is the code that you're running is actually calling the function Puck.light() on the device itself. There is no light sensor on the board you're trying, so it has no Puck.light() function and the call causes an error.

    If you replace Puck.light() for something all boards have like E.getTemperature() then it'd be fine.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

What is the Pixl and MDBT42Q equivalent to puck.js Puck.connect() for BLE

Posted by Avatar for Robin @Robin