matrix-lite-js

0.1.1 • Public • Published

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.

1. Install MATRIX HAL

Add the MATRIX repository and key.

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.

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.

sudo reboot

2. Install Node.js

Downloads and installs the latest version of Node.js, using nvm (Node Version Manager)

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

Readme

Keywords

none

Package Sidebar

Install

npm i matrix-lite-js

Weekly Downloads

1

Version

0.1.1

License

ISC

Unpacked Size

26.2 kB

Total Files

20

Last publish

Collaborators

  • brianofadmobilize