Giter VIP home page Giter VIP logo

matrix-creator-uv-demo's Introduction

matrix-creator-uv-demo

##Installation

###Installation of MALOS

Installation of Hardware abstraction layer for MATRIX Creator usable via 0MQ.

More information about MALOS: https://github.com/matrix-io/matrix-creator-malos

###Installation of nodeJS.

You can use NodeJS from another computer (not the Raspberry) or from the raspberry itself. Check for the most recent version of Node.js, but today it is: https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-armv7l.tar.xz

You can download it, uncompress it and then change the default PATH.

For instance (in the Raspberry):

mkdir nodejs && cd nodejs
wget -c https://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-armv7l.tar.xz
xz -d node-v4.5.0-linux-armv7l.tar.xz
tar xvf node-v4.5.0-linux-armv7l.tar
export PATH=/home/pi/nodejs/node-v4.5.0-linux-armv7l/bin:$PATH

In this version the binary is called node and not nodejs. The IPs used in the examples are 127.0.0.1. Remember to edit them if you're accessing the Creator from another host and not from the Raspberry itself.

###Installation Dependencies

sudo apt install libzmq3-dev

##Running App Make sure you have added Node.js directory in $PATH:

git clone https://github.com/matrix-io/matrix-creator-uv-demo
cd matrix-creator-uv-demo
npm install

Then run MALOS with:

malos & 

MALOS starting
**************

You can query specific driver info using port 20012.
Registered driver IMU with port 20013.
Registered driver Humidity with port 20017.
Registered driver Everloop with port 20021.
Registered driver Pressure with port 20025.
Registered driver UV with port 20029.

Now run index.js with:

node index.js
Invalid configuration for UV driver.
Invalid configuration for UV driver.
New delay between updates for UV is 1000 ms.
New timeout after last ping for UV 6000 ms.
Sending pings every 5 secondslistening on *:5000
Message received: UV error: 0, Invalid configuration for UV driver.
Message received: UV error: 0, Invalid configuration for UV driver.
{ uv_index: 0.08567603677511215, oms_risk: 'Low' }
{ uv_index: 0.08567603677511215, oms_risk: 'Low' }
{ uv_index: 0.08567603677511215, oms_risk: 'Low' }

Now WEB Aplication are running on Raspberry Pi in its local host. Load it in you web browser in 5000 port.

UV Sensor on MATRIX Creator

matrix-creator-uv-demo's People

Contributors

eljuguetero avatar

Stargazers

Timothy Spann avatar

Watchers

Brian Sanchez avatar Sean Canton avatar Maciek Ruckgaber avatar James Cloos avatar  avatar  avatar Kevin Patino avatar

Forkers

fuinha tspannhw

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.