From d2f3fcec72a35ffb8588786508bda3a8f8965b35 Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Tue, 7 Aug 2018 10:59:50 +0100 Subject: [PATCH] Renamed module to node-poweredup --- examples/test.js | 39 --------------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 examples/test.js diff --git a/examples/test.js b/examples/test.js deleted file mode 100644 index d2c257a..0000000 --- a/examples/test.js +++ /dev/null @@ -1,39 +0,0 @@ -const LPF2 = require(".."); - -const lpf2 = new LPF2.LPF2(); -lpf2.scan(); // Start scanning for hubs - -console.log("Looking for Hubs..."); - -lpf2.on("discover", async (hub) => { // Wait to discover hubs - - await hub.connect(); // Connect to hub - console.log(`Connected to ${hub.name}!`); - - await hub.sleep(4000); - - hub.setMotorAngle("A", 90); - console.log("Done"); - - // while (true) { - - // await hub.wait([ - // hub.setMotorSpeed("A", 10, 1000), - // hub.setMotorSpeed("B", 10, 1000) - // ]); - - // await hub.wait([ - // hub.setMotorSpeed("A", -10, 2000), - // hub.setMotorSpeed("B", -10, 2000) - // ]); - - // await hub.wait([ - // hub.setMotorSpeed("A", 10, 1000), - // hub.setMotorSpeed("B", 10, 1000) - // ]); - - // await hub.sleep(4000); - - // } - -}); \ No newline at end of file