RuffApps / illuminance-graph

Illuminance Sensor App with Realtime Graph

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Illuminance Sensor App with Realtime Graphs

This is a demo app using illuminance sensor and provide realtime graphs with LCD screen and via web as well.

Web (using package home as server)

web

LCD

lcd

Development Board and Devices

Development Board

This app has been tested on both ruff-mbd-v1 (Ruff Main Board V1) and rpi-2b (Raspberry Pi 2B). Please make sure your development board have the latest firmware installed (version 1.2 by now).

Devices

This app uses two external devices:

Install and Layout

First of all, we'll need to install app dependencies, includes modules and drivers for this app.

rap install

Then we need to generate layout information based on your target board, say rpi-2b:

rap layout -b rpi-2b --visual

The default board is ruff-mbd-v1, and -b <board> option is only required for changing target board.

Rap will download board specific metadata and drivers (if any), then generate layout information and ruff_box.json for the app to run on your device.

As --visual option is turned on, you should be seeing the visual layout in a browser:

layout

Scan, Deploy and Start

Execute following commands one by one to find your device, then deploy and start the app.

Please copy the IP address of your device and we'll use that to access web graph later.

rap scan
rap deploy -s --source

Option --source will prevent from rap pre-compiling JavaScript files as we have browser side JavaScript in static folder.

If everything goes fine, you should be seeing the LCD updating current illuminance value and a realtime graph by its side. Now open an browser and visit http://<device-ip>/ to view the web version.

License

MIT License.

About

Illuminance Sensor App with Realtime Graph


Languages

Language:JavaScript 95.7%Language:HTML 4.3%