1.4.0 • Published 5 years ago

bitalino v1.4.0

Weekly downloads
5
License
ISC
Repository
github
Last release
5 years ago

bitalino UNDER DEVELOPMENT

Codacy Badge

Only Linux is currently supported.

This package has only been tested on a linux system running Archlinux. Feel free to publish issues.

Dependencies

Every module needs node-gyp installed as well as bluez and libbluetooth-dev on linux systems.

Installation

npm install --save bitalino

Modules

BITalino

This is the native NodeJS module for use with the BITalino.

How to use

Remember the BITalino should be paired first.

const BITalino = require('bitalino').BITalino;

BITalino.createBITalino('98:D3:31:30:26:43', null, function(bitalino) {
    bitalino.send(0xFE); // Simulation mode.
    // bitalino.start();
    while(1) {
        console.log(bitalino.receive(6, 10));
    }
});

API

For details on BITalino Micro Controller Unit visit BITalino's official documentation.

Factory
MethodReturnDescription
createBITalino(String address, timeout = null, Function callback)voidCreates a BITalino object and executes the callback. The function passed as callback will receive a BITalino object instance as its parameter.
BITalino
MethodReturnDescriptionRequired Version
send(Number byte)voidSends a 8-bit message to the BITalino*
start(Number samplingRate, Array analogChannels)voidMessage the BITalino to start streaming data with a given sampling rate (1, 10, 100 or 1000) through the given number of analog channels. Defaults to sampling rate 1 on all channels*
stop()voidStops the stream of data*
receive(Number numberOfChannels, Number numberOfFrames)ArrayReceive the specified number of frames*
battery(Number value = 0)voidSet the battery threshold*
close()voidCloses the connection*
version()voidGet BITalino's version*
state()ObjectGet a state frame from BITalino>= 4.2
pwm(Number output = 255)void>= 4.2

BITalinoWrapped

BITalino wrapped was removed recently, check older branches if you still want to use it.

1.4.0

5 years ago

2.0.0

5 years ago

1.3.0

5 years ago

1.2.5

5 years ago

1.2.4

5 years ago

1.2.3

5 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago