1.2.0 • Published 6 years ago

cordova-plugin-equil-smart-pen v1.2.0

Weekly downloads
11
License
MIT
Repository
github
Last release
6 years ago

Equil Smart Pen Cordova Plugin

Extremely easy plug and play plugin for equil smart pen. SDKs for android and ios are already available and the intention of this project is to available functionalities of the equil smart pen for cross-platform app developers.

Usage

Receiving Pen Cordinates

  window.plugins.EquilSmartPen.onData(function (data) {
    let state = data[0];
    let x = data[1];
    let y = data[2];
  })
States of the pen
StateDescription
1PEN_DOWN
2PEN_MOVE
3PEN_UP
4PEN_HOVER
5PEN_HOVER_DOWN
6PEN_HOVER_MOVE

Recieving Pen Events

  window.plugins.EquilSmartPen.onEvent(function (event) {
    let state = event;
  })
Events of the pen
StateDescription
11PNF_MSG_INVALID_PROTOCOL
12PNF_MSG_FAIL_LISTENING
15PNF_MSG_CONNECTED
16PNF_MSG_PEN_RMD_ERROR
17PNF_MSG_FIRST_DATA_RECV
32PNF_MSG_SESSION_CLOSED
102GESTURE_CIRCLE_CLOCKWISE
103GESTURE_CIRCLE_COUNTERCLOCKWISE
105GESTURE_CLICK
106GESTURE_DOUBLECLICK