Randomised colors on vernie

This commit is contained in:
Nathan Kunicki 2018-07-26 09:22:31 +01:00
parent b0b0523d3a
commit 364607f1b1

View File

@ -61,8 +61,9 @@ lpf2.on("discover", async (hub) => { // Wait to discover Vernie and Remote
} }
if (vernie && remote) { if (vernie && remote) {
vernie.setLEDColor(LPF2.Consts.Colors.GREEN); const color = Math.floor(Math.random() * 10) + 1;
remote.setLEDColor(LPF2.Consts.Colors.GREEN); vernie.setLEDColor(color);
remote.setLEDColor(color);
console.log("You're now ready to go!"); console.log("You're now ready to go!");
} }