From e6a1728f6eceb6a525b6cd89303cb887eee204d6 Mon Sep 17 00:00:00 2001 From: Michael Elliot Braun Date: Thu, 31 Mar 2016 16:39:32 -0700 Subject: [PATCH] update wifi lesson --- docs/lessons/prank-wifi/activity.md | 54 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/docs/lessons/prank-wifi/activity.md b/docs/lessons/prank-wifi/activity.md index d81b4d4f..167cb1e8 100644 --- a/docs/lessons/prank-wifi/activity.md +++ b/docs/lessons/prank-wifi/activity.md @@ -9,37 +9,37 @@ Complete the following exercise. Your code should look like this: ```blocks basic.showString("Check Wifi", 150) basic.forever(() => { - let xAccel = math.abs(input.acceleration("x")) - let yAccel = math.abs(input.acceleration("y")) - let zAccel = math.abs(input.acceleration("z")) + let xAccel = Math.abs(input.acceleration(Dimension.X)) + let yAccel = Math.abs(input.acceleration(Dimension.Y)) + let zAccel = Math.abs(input.acceleration(Dimension.Z)) let sum = xAccel + yAccel + zAccel if (sum < 1400) { - basic.showleds(` -. . . . . -. . . . . -. . # . . -. # # . . -# # # . . -`) + basic.showLeds(` + . . . . . + . . . . . + . . # . . + . # # . . + # # # . . + `) } else if (sum >= 1400 && sum < 1680) { - basic.showleds(` -. . . . . -. . . # . -. . # # . -. # # # . -# # # # . -`) - } - else if (sum >= 1680) { - basic.showleds(` -. . . . . -. . . . . -. . . . . -. . . . . -# . . . . -`) + basic.showLeds(` + . . . . . + . . . # . + . . # # . + . # # # . + # # # # . + `) + } else if (sum >= 1680) { + basic.showLeds(` + . . . . . + . . . . . + . . . . . + . . . . . + # . . . . + `) } }) + ``` **Challenge 1** @@ -53,7 +53,7 @@ Edit this line: if sum is greater than 1400 then just click on the `1400` and ba ```blocks basic.showString("Check Wifi", 150) basic.forever(() => { - let xAccel1 = math.abs(input.acceleration("x")) + let xAccel1 = Math.abs(input.acceleration(Dimension.X)) let yAccel1 = math.abs(input.acceleration("y")) let zAccel1 = math.abs(input.acceleration("z")) let sum1 = xAccel1 + yAccel1 + zAccel1