This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(1, 4, 400, "Test"); | |
// same settings for 2nd advetiser, with bigger granularity | |
beacon.enableAdvertiser(2) | |
beacon.setBroadcastingPower(2, 4); | |
beacon.setBroadcastingInterval(2, 400); | |
beacon.setLocalName(2, "Test"); | |
}, 3000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment