Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
var beacon = require('beacon-pie');
console.log("Wait for the UART to initialize");
setTimeout(function() {
    console.log("UART should be ready by now");
    // setting first advertiser with power 4db, 400ms interval, Local Name "Test"
    beacon.setAdvertisingPacket(14400"Test");
    // same settings for 2nd advetiser, with bigger granularity
    beacon.enableAdvertiser(2
    beacon.setBroadcastingPower(24);
    beacon.setBroadcastingInterval(2400);
    beacon.setLocalName(2"Test");
}, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment