From ac90b16825802a9813fe5ce7464ededfdde50b39 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Wed, 13 Apr 2016 09:03:10 -0700 Subject: [PATCH] fix for #24 --- docs/lessons/magic-logo/activity.md | 4 ++-- docs/reference/js/lessons/magic-logo.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/lessons/magic-logo/activity.md b/docs/lessons/magic-logo/activity.md index 273ddd24..1f32c4c8 100644 --- a/docs/lessons/magic-logo/activity.md +++ b/docs/lessons/magic-logo/activity.md @@ -13,7 +13,7 @@ Welcome! This tutorial will help you display an arrow pointing toward the logo! Using the **accelerometer** sensor, the micro:bit can detect when the **logo** is oriented **up**. We call that the **logo up** event. We will use `on logo up` to register an event handler that will run when the **logo up** event happens. ```blocks -input.onLogoUp(() => { +input.onGesture(Gesture.LogoUp, () => { }) ``` @@ -21,7 +21,7 @@ input.onLogoUp(() => { When the micro:bit goes logo up, the code nested under the `on logo up` function will run. Let's add a line of code to show LEDs in there. ```blocks -input.onLogoUp(() => { +input.onGesture(Gesture.LogoUp, () => { basic.showLeds(` . . # . . . # # # . diff --git a/docs/reference/js/lessons/magic-logo.md b/docs/reference/js/lessons/magic-logo.md index 53fb4b32..899744a2 100644 --- a/docs/reference/js/lessons/magic-logo.md +++ b/docs/reference/js/lessons/magic-logo.md @@ -26,9 +26,10 @@ Learn how to plot image **on logo up**, `input->on logo up` to run code when the ## Documentation -* **on logo up** : [read more...](/functions/on-logo-up) -* **show leds** : [read more...](/reference/basic/show-leds) -* **on logo down** : [read more...](/functions/on-logo-down) +```cards +input.onGesture(Gesture.Shake, () => {}); +basic.showLeds(``); +``` ## Objectives