# copper3d_plugin_heart_k

> ## Useage

Latest version **1.0.14** (published 2022-06-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install copper3d_plugin_heart_k
pnpm add copper3d_plugin_heart_k
yarn add copper3d_plugin_heart_k
bun add copper3d_plugin_heart_k
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.14 |
| Published | 2022-06-27 |
| First published | 2022-06-23 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | skycoco |
| Maintainers | skycoco |

## Links

- npm: https://www.npmjs.com/package/copper3d_plugin_heart_k
- Repository: https://github.com/ABI-Web-Apps/MedTechHeart
- Homepage: https://github.com/ABI-Web-Apps/MedTechHeart#readme
- Issues: https://github.com/ABI-Web-Apps/MedTechHeart/issues
- npm.io page: https://npm.io/package/copper3d_plugin_heart_k

## Dependencies (2)

- [jsfft](https://npm.io/package/jsfft.md) 0.0.4
- [copper3d_plugin_heartjs_config](https://npm.io/package/copper3d_plugin_heartjs_config.md) ^1.0.7

## Recent versions

- 1.0.14 (latest) — 2022-06-27
- 1.0.13 — 2022-06-27
- 1.0.12 — 2022-06-27
- 1.0.11 — 2022-06-27
- 1.0.10 — 2022-06-26
- 1.0.9 — 2022-06-24
- 1.0.8 — 2022-06-24
- 1.0.7 — 2022-06-23
- 1.0.6 — 2022-06-23
- 1.0.5 — 2022-06-23
- 1.0.4 — 2022-06-23
- 1.0.3 — 2022-06-23

## README

# Copper3d Plugin (Heart)

## Useage

- install

```bash
npm i copper3d_plugin_kiwrious
```

- Step1: load `.wasm` file

```js
import * as copper3d_plugin_kiwrious from "copper3d_plugin_heart_k";
copper3d_plugin_kiwrious.setWasm("./791f4146c35521990ba3e84e823a55f3.wasm");
copper3d_plugin_kiwrious.setBinUrl(
  "/kiwrious-config/f1877cdf3dec53d47652f14c1e1b12c1.bin"
);
```

- Step2: connect Kiwrious

```js
await copper3d_plugin_kiwrious.serialService.connectAndReadAsync();
```

- Step3: detect connect (optional)

```js
copper3d_plugin_kiwrious.serialService.onSerialConnection = (
  isConnected: boolean
) => {
  console.log(isConnected);
};
```

- Step4: get Heart data

```js
copper3d_plugin_kiwrious.serialService.onSerialData = (decodedData) => {
  const values = decodedData.decodedValues;

  const val = values[0].value;
  const status = val.status;
  const hrVal = val.heartrate;

  $kiwriousValue.innerText = status;

  if (status === "Ready") {
    $kiwriousValue.innerText = hrVal.toString();
  }
};
```

- Step5: disconnect

```js
await copper3d_plugin_kiwrious.serialService.disconnectAsync();
```

---
_Source: https://npm.io/package/copper3d_plugin_heart_k · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
