ixfx
    Preparing search index...

    Function puck

    • Instantiates a Puck.js. See EspruinoBleDevice for more info. Online demos

      If opts.name is specified, this will the the Bluetooth device sought.

      import { Espruino } from 'https://unpkg.com/ixfx/dist/io.js'
      const e = await Espruino.puck({ name:`Puck.js a123` });

      If no name is specified, a list of all devices starting with Puck.js are shown.

      To get more control over filtering, pass in opts.filter. opts.name is not used as a filter in this scenario.

      import { Espruino } from 'https://unpkg.com/ixfx/dist/io.js'
      const filters = [
      { namePrefix: `Puck.js` },
      { namePrefix: `Pixl.js` },
      {services: [NordicDefaults.service] }
      ]
      const e = await Espruino.puck({ filters });

      Parameters

      Returns Promise<EspruinoBleDevice>

      Returns a connected instance, or throws exception if user cancelled or could not connect.