# matrix-lite-js

> MATRIX Lite JS is a Node.js wrapper that allows users to interface with MATRIX HAL, without having to code in C++.

Latest version **0.1.1** (published 2019-02-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install matrix-lite-js
pnpm add matrix-lite-js
yarn add matrix-lite-js
bun add matrix-lite-js
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2019-02-01 |
| First published | 2019-02-01 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 25.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| Maintainers | brianofadmobilize |

## Links

- npm: https://www.npmjs.com/package/matrix-lite-js
- npm.io page: https://npm.io/package/matrix-lite-js

## Dependencies (3)

- [nan](https://npm.io/package/nan.md) ^2.11.1
- [color](https://npm.io/package/color.md) ^3.1.0
- [node-gyp](https://npm.io/package/node-gyp.md) ^3.8.0

## Recent versions

- 0.1.1 (latest) — 2019-02-01

## README

# MATRIX-Lite-JS
 MATRIX Lite JS is a Node.js wrapper that allows users to interface with MATRIX HAL, without having to code in C++.

# HAL Wrapper Roadmap
This roadmap is for finishing the basic HAL implementation.
- [x] Leds
- [x] Sensors
  - [x] IMU
  - [x] Humidity
  - [x] Pressure
  - [x] UV
- [x] GPIO Digital Write/Read
- [ ] GPIO PWM
- [ ] Microphone (will be implemented through MATRIX Kernel modules)

# Node.js Module Roadmap
Transitioning the HAL Wrapper to a cleaner Node.js module.
- [ ] Leds (working, but not completed)
- [x] Sensors
  - [x] IMU
  - [x] Humidity
  - [x] Pressure
  - [x] UV
- [ ] GPIO Digital Write/Read
- [ ] GPIO PWM

# Installation
Ensure you have a Raspberry Pi, attached with a MATRIX device, that's flashed with [Raspbian Stretch](https://www.raspberrypi.org/blog/raspbian-stretch/).

## 1. Install MATRIX HAL
**Add the MATRIX repository and key.**
```bash
curl https://apt.matrix.one/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.matrix.one/raspbian $(lsb_release -sc) main" |sudo tee /etc/apt/sources.list.d/matrixlabs.list
```
**Update your repository and packages.**
```bash
sudo apt-get update
sudo apt-get upgrade
```
**Install the the MATRIX HAL packages & Git.**
```
sudo apt-get install matrixio-creator-init libmatrixio-creator-hal libmatrixio-creator-hal-dev git
```
**Restart your device.**
```bash
sudo reboot
```

## 2. Install Node.js
**Downloads and installs the latest version of Node.js, using [nvm](https://github.com/creationix/nvm) (Node Version Manager)**
```bash
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
. ~/.bashrc
nvm install node
```
**Use the following command to verify that Node.js was properly installed.**
```
node -v
```

## 3. Download Project
**Download project into any directory**
```
git clone https://github.com/matrix-io/matrix-lite-js
cd matrix-lite-js
```

**Install all Node.js dependencies**
```
npm install
```

**Compile Hal Wrapper**
```
npm run build
```

**Run example**
Although it's not finished, you can play around with the example code in `hal_wrapper_examples.js`
```
node hal_wrapper_examples.js
```

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