diff --git a/examples/duplo_test.js b/examples/duplo_test.js new file mode 100644 index 0000000..527c7d9 --- /dev/null +++ b/examples/duplo_test.js @@ -0,0 +1,40 @@ +const PoweredUP = require(".."); +const poweredUP = new PoweredUP.PoweredUP(); + +poweredUP.on("discover", async (hub) => { // Wait to discover a Hub + console.log(`Discovered ${hub.name}!`); + await hub.connect(); // Connect to the Hub + console.log("Connected"); + let devices = hub.getDevices() + for (let i = 0; i