Skip to content

effective-solutions/cordova-plugin-equil-smart-pen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
State Description
1 PEN_DOWN
2 PEN_MOVE
3 PEN_UP
4 PEN_HOVER
5 PEN_HOVER_DOWN
6 PEN_HOVER_MOVE

Recieving Pen Events

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