From 6c59169bed989fc9f9f7a5a5f7534a1b62a06446 Mon Sep 17 00:00:00 2001 From: Nathan Kunicki Date: Thu, 16 Aug 2018 15:23:31 +0100 Subject: [PATCH] Tidied examples --- examples/automated_train_layout.js | 4 ++-- examples/leds.js | 4 ++-- examples/train_controller.js | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/automated_train_layout.js b/examples/automated_train_layout.js index a73a98e..f15712e 100644 --- a/examples/automated_train_layout.js +++ b/examples/automated_train_layout.js @@ -1,9 +1,9 @@ // This example won't work by itself, this is the code used to automate this train layout: https://www.youtube.com/watch?v=Tyzo_hHFiUc // It is included here as an example. -const PoweredUP = require("..").PoweredUP; +const PoweredUP = require(".."); -const poweredUP = new PoweredUP(); +const poweredUP = new PoweredUP.PoweredUP(); poweredUP.scan(); // Start scanning for hubs console.log("Looking for Hubs..."); diff --git a/examples/leds.js b/examples/leds.js index 87ff990..1e19c06 100644 --- a/examples/leds.js +++ b/examples/leds.js @@ -4,9 +4,9 @@ * */ -const PoweredUP = require("..").PoweredUP; +const PoweredUP = require(".."); -const poweredUP = new PoweredUP(); +const poweredUP = new PoweredUP.PoweredUP(); poweredUP.scan(); // Start scanning for hubs console.log("Looking for Hubs..."); diff --git a/examples/train_controller.js b/examples/train_controller.js index 4341b42..2be0406 100644 --- a/examples/train_controller.js +++ b/examples/train_controller.js @@ -1,5 +1,6 @@ const PoweredUP = require(".."); -const poweredUP = new PoweredUP.PoweredUP(); + +const poweredUP = new PoweredUP.PoweredUP() const trains = [ {