npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

metawearesteps

v0.0.1

Published

Metawear SDK for IOS Android

Downloads

2

Readme

metawear

Metawear SDK for IOS Android

Install

npm install metawear
npx cap sync

API

echo(...)

echo(options: { value: string; }) => Promise<{ value: string; }>

| Param | Type | | ------------- | ------------------------------- | | options | { value: string; } |

Returns: Promise<{ value: string; }>


initialize()

initialize() => Promise<null>

Initialize Permissions.

Returns: Promise<null>


search()

search() => Promise<null>

Connects to the metawear sensor.

Returns: Promise<null>


testFunc(...)

testFunc(data: DeviceOptions) => Promise<null>

| Param | Type | | ---------- | ------------------------------------------------------- | | data | DeviceOptions |

Returns: Promise<null>


connect(...)

connect(data: DeviceOptions) => Promise<null>

Connects to the metawear sensor.

| Param | Type | | ---------- | ------------------------------------------------------- | | data | DeviceOptions |

Returns: Promise<null>


connectSensor1(...)

connectSensor1(data: DeviceOptions) => Promise<ConnectedDevice>

Connects to the metawear sensor number 1.

| Param | Type | | ---------- | ------------------------------------------------------- | | data | DeviceOptions |

Returns: Promise<ConnectedDevice>


connectSensor2(...)

connectSensor2(data: DeviceOptions) => Promise<ConnectedDevice>

Connects to the metawear sensor number 2.

| Param | Type | | ---------- | ------------------------------------------------------- | | data | DeviceOptions |

Returns: Promise<ConnectedDevice>


disconnect(...)

disconnect(data: DeviceOptions) => Promise<DisconnectResult>

Disconnect metawear sensor.

| Param | Type | | ---------- | ------------------------------------------------------- | | data | DeviceOptions |

Returns: Promise<DisconnectResult>


startData()

startData() => Promise<null>

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

Returns: Promise<null>


startAccelData(...)

startAccelData(accelData?: AccelData | undefined) => 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) => { ... });

| Param | Type | | --------------- | ----------------------------------------------- | | accelData | AccelData |

Returns: Promise<null>


stopAccelData()

stopAccelData() => Promise<StreamData>

Returns: Promise<StreamData>


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>


stopGyroData()

stopGyroData() => Promise<null>

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>


checkSensorsConnections()

checkSensorsConnections() => Promise<null>

Check for the connections status of both sensors

Returns: Promise<null>


reconnectSensors()

reconnectSensors() => Promise<null>

Reconnect both sensors

Returns: Promise<null>


reconnectSensor1()

reconnectSensor1() => Promise<resultConnection>

Reconnect sensors2

Returns: Promise<resultConnection>


reconnectSensor2()

reconnectSensor2() => Promise<resultConnection>

Reconnect sensor1

Returns: Promise<resultConnection>


downloadDataSensor1()

downloadDataSensor1() => Promise<BoardData>

Download Sensor1

Returns: Promise<BoardData>


downloadDataSensor2()

downloadDataSensor2() => Promise<BoardData>

Download Sensor2

Returns: Promise<BoardData>


disconnectSensor2()

disconnectSensor2() => Promise<DisconnectResult>

Download Sensor2

Returns: Promise<DisconnectResult>


disconnectSensor1()

disconnectSensor1() => Promise<DisconnectResult>

Download Sensor2

Returns: Promise<DisconnectResult>


Interfaces

DeviceOptions

| Prop | Type | | ---------- | ------------------- | | freq | number | | name | string | | mac | string |

ConnectedDevice

| Prop | Type | | ------------- | ------------------- | | battery | number |

DisconnectResult

| Prop | Type | | ------------ | -------------------- | | result | boolean |

AccelData

| Prop | Type | | ---------- | ------------------- | | time | number |

StreamData

| Prop | Type | | ------------- | ----------------------------------------------- | | sensor1 | BoardData | | sensor2 | BoardData |

BoardData

| Prop | Type | | --------------------- | --------------------- | | x_accel | number[] | | y_accel | number[] | | z_accel | number[] | | timestamp_accel | string[] | | x_gyro | number[] | | y_gyro | number[] | | z_gyro | number[] | | timestamp_gyro | string[] |

resultConnection

| Prop | Type | | --------------- | -------------------- | | connected | boolean |