metawear-capacitor
TypeScript icon, indicating that this package has built-in type declarations

0.4.92 • Public • Published

metawear-capacitor

Capacitor plugin for metawear's swift sdk.

Install

npm install metawear-capacitor
npx cap sync

API

connect()

connect() => Promise<null>

Connects to the metawear sensor.

Returns: Promise<null>


disconnect()

disconnect() => Promise<null>

Disconnect metawear sensor.

Returns: Promise<null>


startData()

startData() => Promise<null>

Start accel and gryo data streaming and on-board logging.

Returns: Promise<null>


startAccelData()

startAccelData() => Promise<null>

Start accel data streaming and on-board logging.

Listen in JS for the logging ID with: MetawearCapacitor.addListener('accelLogID', (logID) -> { ... });

Listen in JS with: MetawearCapacitor.addListener('accelData', (accel) => { ... });

Returns: Promise<null>


startGyroData()

startGyroData() => Promise<null>

Start gyro data streaming and on-board logging.

Listen in JS for the logging ID with: MetawearCapacitor.addListener('gyroLogID', (logID) -> { ... });

Listen in JS for data stream with: MetawearCapacitor.addListener('gyroData', (gyro) => { ... });

Returns: Promise<null>


stopData()

stopData() => Promise<null>

Stop data streaming and on-board logging.

Returns: Promise<null>


downloadData()

downloadData() => Promise<null>

Downloads one of the two logs from the metawear sensor.

Listen in JS for the log data with: MetawearCapacitor.addListener('logData-ID', (logData) -> { ... }); (logData["x"], logData["y"], logData["z"] are floats.)

Listen in JS for the log progress with: MetawearCapacitor.addListener('logProgress-ID', (progress) -> { ... }); (progress["progress"] is a number between 0 and 1.)

Listen in JS for log finish with: MetawearCapacitor.addListener('logFinished-ID', () => { ... });

Returns: Promise<null>


stopLogs()

stopLogs() => Promise<null>

Stop on-board logging.

Returns: Promise<null>


Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.4.920latest

Version History

VersionDownloads (Last 7 Days)Published
0.4.920
0.4.910
0.4.90
0.4.81
0.4.70
0.4.60
0.4.50
0.4.40
0.4.30
0.4.20
0.4.10
0.4.00
0.3.10
0.3.00
0.2.110
0.2.100
0.2.90
0.2.80
0.2.70
0.2.60
0.2.50
0.2.40
0.2.30
0.2.20
0.2.10
0.2.00
0.1.120
0.1.110
0.1.100
0.1.90
0.1.80
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.20
0.1.10
0.1.00
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.40
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i metawear-capacitor

Weekly Downloads

1

Version

0.4.92

License

MIT

Unpacked Size

75.8 kB

Total Files

22

Last publish

Collaborators

  • flyn_nick