Coder Social home page Coder Social logo

hardillb / node-eddystone-beacon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jacobrosenthal/node-eddystone-beacon

1.0 2.0 0.0 80 KB

Create an Eddystone Beacon using Node.js https://github.com/google/eddystone

License: Other

JavaScript 100.00%

node-eddystone-beacon's Introduction

node-eddystone-beacon

Create an Eddystone Beacon using Node.js

Eddystone-URL beacons can be used with the Physical Web.

Prerequisites

Requires Node.js and Linux or OS X 10.10 or above with Bluetooth 4.0 hardware.

On Linux, you need to run with sudo or as root. See bleno for more info.

Have an older machine or Raspberry Pi? Add a Bluetooth 4.0 USB Adapter.

Install

npm install eddystone-beacon

Usage

var eddystoneBeacon = require('eddystone-beacon');

Options

var options = {
  txPowerLevel: -22  // override TX Power Level, default value is -21,
  tlmCount: 2,       // 2 TLM frames
  tlmPeriod: 10      // every 10 advertisements
};

Note: an advertising interval of 100ms is used.

Eddystone-URL

var url = 'http://example.com';

eddystoneBeacon.advertiseUrl(url, [options]);

Eddystone-UID

var namespaceId = '00010203040506070809';
var instanceId = 'aabbccddeeff';

eddystoneBeacon.advertiseUid(namespaceId, instanceId, [options]);

TLM data

Use with interleaved TLM mode, see options above.

Battery Voltage

var batteryVoltage = 500; // between 500 and 10,000 mV

eddystoneBeacon.setBatteryVoltage(batteryVoltage);

Temperature

var temperature = 22.0; // between -128.0 and 128.0

eddystoneBeacon.setTemperature(temperature);

Examples

Development

Install the dependencies

npm install

Run tests

npm test

node-eddystone-beacon's People

Contributors

dermike avatar don avatar johnnyman727 avatar kahluagenie avatar pgaubatz avatar sandeepmistry avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.