turn-touch-element
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Built With Stencil

<turn-touch>

Web component to interact with a Turn Touch remote using Web Bluetooth.

Learn more about Web Bluetooth: https://steele.blue/web-bluetooth/

Usage

Step 1: Buy a Turn Touch :)

Step 2: Install with a script tag:

<script src="https://unpkg.com/turn-touch-element@0.0.2/dist/mycomponent.js"></script>

Or load with Webpack/Rollup as described here

Step 3: Add the element to your page:

<turn-touch></turn-touch>

Methods

connect(): Connects to the Turn Touch remote

Events

buttonPress: CustomEvent triggered when a button is pressed on the remote.

Contains a detail payload of PressDetails:

interface PressDetails {
  button: ButtonType;
}
type ButtonType = 
  | 'Off'
  | 'Up'
  | 'Up Hold'
  | 'Left'
  | 'Left Hold'
  | 'Right'
  | 'Right Hold'
  | 'Down'
  | 'Down Hold';

/turn-touch-element/

    Package Sidebar

    Install

    npm i turn-touch-element

    Weekly Downloads

    1

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    159 kB

    Total Files

    38

    Last publish

    Collaborators

    • mattdsteele