@tibbo-tps/tibbit-28

0.0.4 • Public • Published

Tibbit #28 (Ambient light sensor)

The node module for data collection from Tibbit #28 (Ambient light sensor) block.

Installation Instructions

The module is available as precompiled binary and C source code.

Install the module

npm install @tibbo-tps/tibbit-28

Usage

var lightSensor = require("@tibbo-tps/tibbit-28").init(socket);

API Methods:

init(socket)

  • socked - TPP socket number

Returns an object with a singe method:

.getData()

Returns an object with the following properties:

  • illumination - Illumination, Lx

Example:

var lightSensor = require("@tibbo-tps/tibbit-28").init("S1");
setInterval(function(){
    var data = lightSensor.getData();
    console.log("Illumination: "+data.illumination);
},1000);

About the Tibbit #28 block

This Tibbit is based on the BH1721FVC ambient light sensor with I2C interface. The sensor is implemented as the C1 device with a clear (transparent) window.

The module measures the light intensity of the surrounding environment and its spectral response is close to that of a human eye.

The module outputs ambient light measurements as 16-bit values that do not correspond to any standard measurement units.

This C1 device requires that Tibbit #00-3 is installed in the neighbouring "M" socket. #00-3 provides two direct lines for I2C comms, as well as the ground and +5V power for the BH1721FVC IC.

Readme

Keywords

none

Package Sidebar

Install

npm i @tibbo-tps/tibbit-28

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

53.9 kB

Total Files

5

Last publish

Collaborators

  • tibbo-tps