From c749c8b644e768ab5ed50cf3bc7623019ef9c43c Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 11:11:05 -0700 Subject: [PATCH 01/12] Bump pxt-core to 0.2.157 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 574dc61d..27427aa2 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.2.156" + "pxt-core": "0.2.157" } } From 94f1b6c785c329e87516967cafe91dd4c97b7786 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 11:11:08 -0700 Subject: [PATCH 02/12] 0.2.145 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 27427aa2..38c9bdfc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.2.144", + "version": "0.2.145", "description": "BBC micro:bit target for PXT", "keywords": [ "JavaScript", From ca3702b4fe720ac74751e9406e8aa64e39770fa0 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 13:43:10 -0700 Subject: [PATCH 03/12] Bump pxt-core to 0.2.159 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 38c9bdfc..86141f89 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.2.157" + "pxt-core": "0.2.159" } } From 84f14182bfcf1f9d3167834b13700364342ee80d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 13:43:13 -0700 Subject: [PATCH 04/12] 0.2.146 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 86141f89..af7a9df1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.2.145", + "version": "0.2.146", "description": "BBC micro:bit target for PXT", "keywords": [ "JavaScript", From 899ca47a77ed000aa1e77082a43e4ea3fabf4807 Mon Sep 17 00:00:00 2001 From: Ron Hale-Evans Date: Fri, 3 Jun 2016 14:06:24 -0700 Subject: [PATCH 05/12] Rewritten for clarity. Already has great example! --- docs/reference/music/ring-tone.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/reference/music/ring-tone.md b/docs/reference/music/ring-tone.md index 6e214134..72853be8 100644 --- a/docs/reference/music/ring-tone.md +++ b/docs/reference/music/ring-tone.md @@ -1,10 +1,11 @@ # Ring Tone -Play a continuous tone through pin P0. +Play a musical tone through pin `P0` with the pitch as high or low as you say. +The tone will keep playing until you tell it not to. ## Simulator -Simulation of this function is available in many, but not all browsers. +This function only works on the micro:bit and in some browsers. ```sig music.ringTone(440) @@ -12,11 +13,18 @@ music.ringTone(440) ### Parameters -* `frequency` : [Number](/reference/types/number) - Plays a tone in (Hz) +* a [number](/reference/types/number) that says the tone's +**frequency** (how high-pitched or low-pitched the tone is). This +number is in **Hz** (**Hertz**), which is a measurement of frequency +or pitch. ### Example -Play a sound based on the tile of the device +This program checks the **accelerometer** for the micro:bit's +**acceleration** (how much the micro:bit is speeding up or slowing +down). Then it uses that acceleration to make a tone. If the micro:bit +speeds up, the tone's pitch gets higher, and if it slows down, the +tone's pitch gets lower. It's fun -- try it! ```blocks basic.forever(() => { @@ -26,5 +34,6 @@ basic.forever(() => { ### See also -[rest](/reference/music/rest), [play tone](/reference/music/play-tone) , [tempo](/reference/music/tempo), [set tempo](/reference/music/set-tempo), [change tempo by](/reference/music/change-tempo-by) - +[rest](/reference/music/rest), [play tone](/reference/music/play-tone), +[tempo](/reference/music/tempo), [set tempo](/reference/music/set-tempo), +[change tempo by](/reference/music/change-tempo-by) From 1f8ea7ad30d86d70fa07bc4803ca1855dd84a930 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 14:24:39 -0700 Subject: [PATCH 06/12] removed dangling link. --- docs/lessons.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/lessons.md b/docs/lessons.md index 9f07af5d..9474d2ca 100644 --- a/docs/lessons.md +++ b/docs/lessons.md @@ -71,4 +71,4 @@ ### @section full -The lessons promote computational thinking and computer science literacy[ read more...](/lessons/teach) \ No newline at end of file +The lessons promote computational thinking and computer science literacy. \ No newline at end of file From e785ece9bd4c3c08dd797335cd7d88931e06e4b2 Mon Sep 17 00:00:00 2001 From: Ron Hale-Evans Date: Fri, 3 Jun 2016 15:15:24 -0700 Subject: [PATCH 07/12] Numerous requested changes. Still missing heads/tails. --- docs/getting-started.md | 273 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 252 insertions(+), 21 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 4c2d5500..4080fff2 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -1,10 +1,14 @@ # Getting started +## ~avatar + Are you ready to build cool BBC micro:bit programs? Here are some challenges for you. Unscramble the blocks in the editor to make real programs that work! +## ~ + ### Happy face There are three blocks in the editor (the area to the left). @@ -33,11 +37,7 @@ When you run this program, you will see a smiley face, then a blank screen, then a smiley again -- it never stops! (That's because of the ``forever`` block.) -To move your program from your computer to the BBC micro:bit: -* Connect your micro:bit to the computer with the USB cable. -* Click **Compile**. -* Drag and drop the new file whose name ends in **.hex** into the **MICROBIT** window. -* Wait until the yellow light stops blinking! +Now move your program from your computer to the BBC micro:bit! ### Happy unhappy face @@ -66,11 +66,7 @@ basic.forever(() => { }); ``` -To move your program from your computer to the BBC micro:bit: -* Connect your micro:bit to the computer with the USB cable. -* Click **Compile**. -* Drag and drop the new file whose name ends in **.hex** into the **MICROBIT** window. -* Wait until the yellow light stops blinking! +Now move your program from your computer to the BBC micro:bit! ### Your turn! @@ -124,11 +120,7 @@ basic.forever(() => { }); ``` -To move your program from your computer to the BBC micro:bit: -* Connect your micro:bit to the computer with the USB cable. -* Click **Compile**. -* Drag and drop the new file whose name ends in **.hex** into the **MICROBIT** window. -* Wait until the yellow light stops blinking! +Now move your program from your computer to the BBC micro:bit! #### ~hint @@ -138,12 +130,12 @@ You can find the ``show leds`` block in the **Basic** part of the editor. ### Button A and button B -This program will show the word **anteater** on the LED +This program will show the word **ANTEATER** on the LED screen when you press button `A`. ```blocks input.onButtonPressed(Button.A, () => { - basic.showString("anteater"); + basic.showString("ANTEATER"); }); ``` @@ -155,11 +147,11 @@ on the micro:bit screen. #### ~ Now try to unscramble these blocks in the editor so that the micro:bit -shows **banana** when you press button `B`. +shows **BANANA** when you press button `B`. ```shuffle input.onButtonPressed(Button.B, () => { - basic.showString("banana"); + basic.showString("BANANA"); }); ``` #### ~hint @@ -172,8 +164,8 @@ You can find the letter `B` by clicking the letter `A` on the #### Your turn! Can you combine these blocks so your program shows your real name -instead of **anteater** when you press `A`, but _your secret agent -name_ instead of **banana** when you press `B`? +instead of **ANTEATER** when you press `A`, but _your secret agent +name_ instead of **BANANA** when you press `B`? ### Shake @@ -271,3 +263,242 @@ with the BBC micro:bit! What about some of these? These are all things you can make with the BBC micro:bit by itself. Just think what you can do if you connect the micro:bit's pins to extra parts like microphones and other **sensors**! + +## Let's play Rock Paper Scissors! + +### ~avatar avatar + +```sim +input.onGesture(Gesture.Shake, () => { + let img = Math.random(3) + if (img == 0) { + basic.showLeds(` + # # # # # + # . . . # + # . . . # + # . . . # + # # # # # + `) + + } else if (img == 1) { + basic.showLeds(` + . . . . . + . # # # . + . # # # . + . # # # . + . . . . . + `) + } else { + basic.showLeds(` + # # . . # + # # . # . + . . # . . + # # . # . + # # . . # + `) + } +}) +``` +Build a Rock Paper Scissors game with the BBC micro:bit! +You can play the game with a friend who has it on a micro:bit. +You can also play it with friends who are just using their hands. + +## [START PROJECT](/#follow:/projects/rock-paper-scissors) + +### ~ + + +## Materials needed + +* Your BBC micro:bit -- that's it! + +## Step 1: Getting started + +We want the micro:bit to choose rock, paper, or scissors when you +shake it. Try creating an ``on shake`` block so when you shake the +micro:bit, it will run part of a program. + +```blocks +input.onGesture(Gesture.Shake, () => { + +}) +``` + +Next, when you shake the micro:bit, it should pick a random number from `0` to `2` +and store it in the variable `weapon`. (This variable is named `weapon` because +rock, paper, and scissors are the weapons you use to battle your friends!) + +Add a ``set`` block with a variable. Then add a ``pick random`` block, +and store the random number in the variable, +like this: + +```blocks +input.onGesture(Gesture.Shake, () => { + let weapon = Math.random(3) +}) + +``` + +### ~hint +No one can predict random numbers. That's what makes them great for Rock Paper Scissors! +### ~ + +Each possible number these blocks can make (`0`, `1`, or `2`) means a different picture. +We will show the right picture for that number on the LED screen. + + +## Step 2: Picking paper + +Put an ``if`` block after the ``let`` block that checks whether +`weapon` is `0`. Make sure the ``if`` block has an ``else if`` part +and an ``else`` part. + +Next, add a ``show leds`` block that shows a +picture of a piece of paper: + +```blocks +input.onGesture(Gesture.Shake, () => { + let weapon = Math.random(3) + if (weapon == 0) { + basic.showLeds(` + # # # # # + # . . . # + # . . . # + # . . . # + # # # # # + `) + } else if (false) { + + } else { + + } +}) +``` + +## Step 3: A random rock + +Now we are going to add a new picture for the micro:bit to show +when another random number comes up. + +Make the ``else if`` part check if the variable `weapon` is `1`. +Then add a ``show leds`` block with a picture of a rock. + +```blocks +input.onGesture(Gesture.Shake, () => { + let weapon = Math.random(3) + if (weapon == 0) { + basic.showLeds(` + # # # # # + # . . . # + # . . . # + # . . . # + # # # # # + `) + + } else if (weapon == 1) { + basic.showLeds(` + . . . . . + . # # # . + . # # # . + . # # # . + . . . . . + `) + } else { + + } +}) +``` + +## Step 4: Suddenly scissors + +Add a ``show leds`` block with a picture of scissors to the ``else`` part: + +```blocks +input.onGesture(Gesture.Shake, () => { + let weapon = Math.random(3) + if (weapon == 0) { + basic.showLeds(` + # # # # # + # . . . # + # . . . # + # . . . # + # # # # # + `) + + } else if (weapon == 1) { + basic.showLeds(` + . . . . . + . # # # . + . # # # . + . # # # . + . . . . . + `) + } else { + basic.showLeds(` + # # . . # + # # . # . + . . # . . + # # . # . + # # . . # + `) + } +}) + +``` + +### ~hint + +You don't need to check if `weapon` is `2` because `2` is the only number left out of `0`, `1`, and `2`. +That's why you can use an ``else`` instead of an ``else if``. + +### ~ + +Your game is ready! Have fun! + +## Step 5: Are you the greatest? + +Here is a way you can make your Rock Paper Scissors game better. +When button ``A`` is pressed, +the micro:bit will add `1` to your score. + +Open the ``Game`` drawer, and then add the block ``change score by 1`` to your program, +like this: + +```blocks +input.onButtonPressed(Button.A, () => { + game.addScore(1) +}) + +``` + +## Step 6: Prove you're the greatest! + +After your micro:bit can add `1` to the score, show how many wins you have. + +```blocks +input.onButtonPressed(Button.A, () => { + game.addScore(1) + basic.showString("WINS:") + basic.showNumber(game.score()) +}) +``` +## Step 7: Staying honest + +Success! Your micro:bit can track wins! +But what about losses? +Use the ``Game`` drawer to subtract `1` from your score when you press button `B`. + +Here are all the blocks you will need: + +```shuffle +input.onButtonPressed(Button.B, () => { + game.addScore(-1) + basic.showString("LOSSES:") + basic.showNumber(game.score()) +}) +``` + +## Your turn! + +How else can you make your game better? +Ever hear of [Rock Paper Scissors Spock Lizard](http://www.samkass.com/theories/RPSSL.html)? From 97894511ddbd07599203a2fa57850b9eb39994ef Mon Sep 17 00:00:00 2001 From: Ron Hale-Evans Date: Fri, 3 Jun 2016 15:42:18 -0700 Subject: [PATCH 08/12] Spot reminders to click COMPILE. --- docs/getting-started.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 4080fff2..394e3b3e 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -37,7 +37,7 @@ When you run this program, you will see a smiley face, then a blank screen, then a smiley again -- it never stops! (That's because of the ``forever`` block.) -Now move your program from your computer to the BBC micro:bit! +Click **Compile** to move your program to the BBC micro:bit! ### Happy unhappy face @@ -65,8 +65,7 @@ basic.forever(() => { `) }); ``` - -Now move your program from your computer to the BBC micro:bit! +Click **Compile** to move your program to the BBC micro:bit! ### Your turn! @@ -119,8 +118,7 @@ basic.forever(() => { `) }); ``` - -Now move your program from your computer to the BBC micro:bit! +Click **Compile** to move your program to the BBC micro:bit! #### ~hint @@ -161,6 +159,8 @@ You can find the letter `B` by clicking the letter `A` on the #### ~ +Click **Compile** to move your program to the BBC micro:bit! + #### Your turn! Can you combine these blocks so your program shows your real name @@ -186,6 +186,7 @@ input.onGesture(Gesture.Shake, () => { # . . . #`); }); ``` +Click **Compile** to move your program to the BBC micro:bit! ### Tilting with gestures @@ -226,6 +227,7 @@ input.onGesture(Gesture.TiltRight, () => { # # . . #`); }); ``` +Click **Compile** to move your program to the BBC micro:bit! ### Pins @@ -247,6 +249,7 @@ input.onPinPressed(TouchPin.P0, () => { . # # # .`); }); ``` +Click **Compile** to move your program to the BBC micro:bit! ### Your turn! @@ -453,7 +456,11 @@ That's why you can use an ``else`` instead of an ``else if``. ### ~ -Your game is ready! Have fun! +Your game is ready! + +Click **Compile** to move your program to the BBC micro:bit! + +Have fun! ## Step 5: Are you the greatest? @@ -497,6 +504,7 @@ input.onButtonPressed(Button.B, () => { basic.showNumber(game.score()) }) ``` +Click **Compile** to move your program to the BBC micro:bit! ## Your turn! From f9a7ec89e49cbcfc76ff75fea513687b5a55b5f1 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 21:09:59 -0700 Subject: [PATCH 09/12] Bump pxt-core to 0.2.161 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index af7a9df1..dc475619 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,6 @@ "typescript": "^1.8.7" }, "dependencies": { - "pxt-core": "0.2.159" + "pxt-core": "0.2.161" } } From 5206f1f8e8ca4114a4d59d1c118920f107a4a955 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 21:10:03 -0700 Subject: [PATCH 10/12] 0.2.147 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index dc475619..b364302e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pxt-microbit", - "version": "0.2.146", + "version": "0.2.147", "description": "BBC micro:bit target for PXT", "keywords": [ "JavaScript", From 66aba696dcd0b2f1ba493ea69a3e6d6991a7fa8d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 22:19:43 -0700 Subject: [PATCH 11/12] tweaks to getting started --- docs/getting-started.md | 137 ++++++++-------------------------------- 1 file changed, 26 insertions(+), 111 deletions(-) diff --git a/docs/getting-started.md b/docs/getting-started.md index 394e3b3e..cb79f576 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -7,6 +7,8 @@ Are you ready to build cool BBC micro:bit programs? Here are some challenges for you. Unscramble the blocks in the editor to make real programs that work! +[OPEN EDITOR](/#follow:getting-started) + ## ~ ### Happy face @@ -188,47 +190,6 @@ input.onGesture(Gesture.Shake, () => { ``` Click **Compile** to move your program to the BBC micro:bit! -### Tilting with gestures - -You can also find when someone is tilting the micro:bit left or right, -face up or face down, and logo up or logo down (the logo is the yellow -oval picture at the top of the board). Tilting a micro:bit like this -is called a **gesture**. - -Try to build a Rock Paper Scissors game where you tilt the micro:bit -left to show paper, right to show scissors, and down to show rock. - -Unscramble these blocks in the editor and try this program on a real -micro:bit! - -```shuffle -input.onGesture(Gesture.TiltLeft, () => { - basic.showLeds(` -# # # # # -# . . . # -# . . . # -# . . . # -# # # # #`); -}); -input.onGesture(Gesture.LogoDown, () => { - basic.showLeds(` -. . . . . -. # # # . -. # # # . -. # # # . -. . . . .`); -}); -input.onGesture(Gesture.TiltRight, () => { - basic.showLeds(` -# # . . # -# # . # . -. . # . . -# # . # . -# # . . #`); -}); -``` -Click **Compile** to move your program to the BBC micro:bit! - ### Pins You can also use the pins as buttons. (The pins are the holes in the @@ -236,91 +197,47 @@ metal stripe at the bottom of the micro:bit board.) For example, hold the ``GND`` button with one hand and touch the ``0`` pin (called ``P0``) with your other hand to tell the micro:bit you're pressing it. -Unscramble the blocks in the editor to show a smiley when you press +Unscramble the blocks in the editor to show a heart when you press pin ``P0``. ```shuffle input.onPinPressed(TouchPin.P0, () => { basic.showLeds(` -. . . . . . # . # . -. . . . . +# . # . # # . . . # -. # # # .`); +. # . # . +. . # . .`); }); ``` Click **Compile** to move your program to the BBC micro:bit! -### Your turn! +## ~hint -Use the screen, buttons, gestures, and pins to make your own fun game -with the BBC micro:bit! What about some of these? +Try this experiment: find a friend and hold hands together. Press the ``GND`` button +while your friend pressed the ``P0`` button. You should see the heart! The electric current is going through your bodies and accross your handshake +to make it happen! -* A backpack burglar alarm -* Daily news broadcaster for your class -* Animated jewelry -* A _complete_ animated cartoon -* A calculator -* A music box - -These are all things you can make with the BBC micro:bit by itself. -Just think what you can do if you connect the micro:bit's pins to -extra parts like microphones and other **sensors**! +## ~ ## Let's play Rock Paper Scissors! ### ~avatar avatar -```sim -input.onGesture(Gesture.Shake, () => { - let img = Math.random(3) - if (img == 0) { - basic.showLeds(` - # # # # # - # . . . # - # . . . # - # . . . # - # # # # # - `) - - } else if (img == 1) { - basic.showLeds(` - . . . . . - . # # # . - . # # # . - . # # # . - . . . . . - `) - } else { - basic.showLeds(` - # # . . # - # # . # . - . . # . . - # # . # . - # # . . # - `) - } -}) -``` Build a Rock Paper Scissors game with the BBC micro:bit! You can play the game with a friend who has it on a micro:bit. You can also play it with friends who are just using their hands. -## [START PROJECT](/#follow:/projects/rock-paper-scissors) - ### ~ - -## Materials needed - -* Your BBC micro:bit -- that's it! - ## Step 1: Getting started We want the micro:bit to choose rock, paper, or scissors when you shake it. Try creating an ``on shake`` block so when you shake the micro:bit, it will run part of a program. +Clear up the blocks and add the blocks below. + ```blocks input.onGesture(Gesture.Shake, () => { @@ -328,8 +245,7 @@ input.onGesture(Gesture.Shake, () => { ``` Next, when you shake the micro:bit, it should pick a random number from `0` to `2` -and store it in the variable `weapon`. (This variable is named `weapon` because -rock, paper, and scissors are the weapons you use to battle your friends!) +and store it in the variable `item`. Add a ``set`` block with a variable. Then add a ``pick random`` block, and store the random number in the variable, @@ -337,7 +253,7 @@ like this: ```blocks input.onGesture(Gesture.Shake, () => { - let weapon = Math.random(3) + let item = Math.random(3) }) ``` @@ -353,7 +269,7 @@ We will show the right picture for that number on the LED screen. ## Step 2: Picking paper Put an ``if`` block after the ``let`` block that checks whether -`weapon` is `0`. Make sure the ``if`` block has an ``else if`` part +`item` is `0`. Make sure the ``if`` block has an ``else if`` part and an ``else`` part. Next, add a ``show leds`` block that shows a @@ -361,8 +277,8 @@ picture of a piece of paper: ```blocks input.onGesture(Gesture.Shake, () => { - let weapon = Math.random(3) - if (weapon == 0) { + let item = Math.random(3) + if (item == 0) { basic.showLeds(` # # # # # # . . . # @@ -383,13 +299,13 @@ input.onGesture(Gesture.Shake, () => { Now we are going to add a new picture for the micro:bit to show when another random number comes up. -Make the ``else if`` part check if the variable `weapon` is `1`. +Make the ``else if`` part check if the variable `item` is `1`. Then add a ``show leds`` block with a picture of a rock. ```blocks input.onGesture(Gesture.Shake, () => { - let weapon = Math.random(3) - if (weapon == 0) { + let item = Math.random(3) + if (item == 0) { basic.showLeds(` # # # # # # . . . # @@ -397,8 +313,7 @@ input.onGesture(Gesture.Shake, () => { # . . . # # # # # # `) - - } else if (weapon == 1) { + } else if (item == 1) { basic.showLeds(` . . . . . . # # # . @@ -418,8 +333,8 @@ Add a ``show leds`` block with a picture of scissors to the ``else`` part: ```blocks input.onGesture(Gesture.Shake, () => { - let weapon = Math.random(3) - if (weapon == 0) { + let item = Math.random(3) + if (item == 0) { basic.showLeds(` # # # # # # . . . # @@ -428,7 +343,7 @@ input.onGesture(Gesture.Shake, () => { # # # # # `) - } else if (weapon == 1) { + } else if (item == 1) { basic.showLeds(` . . . . . . # # # . @@ -451,7 +366,7 @@ input.onGesture(Gesture.Shake, () => { ### ~hint -You don't need to check if `weapon` is `2` because `2` is the only number left out of `0`, `1`, and `2`. +You don't need to check if `item` is `2` because `2` is the only number left out of `0`, `1`, and `2`. That's why you can use an ``else`` instead of an ``else if``. ### ~ From e3b635078568e86d12b657882ce8d4aed578c12d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Fri, 3 Jun 2016 22:22:13 -0700 Subject: [PATCH 12/12] upgraded to lancaster 2.0.0-rc4 (core 0.1.11) --- pxtarget.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pxtarget.json b/pxtarget.json index 9d5391c9..c46d4054 100644 --- a/pxtarget.json +++ b/pxtarget.json @@ -68,7 +68,7 @@ "yottaTarget": "bbc-microbit-classic-gcc", "yottaCorePackage": "pxt-microbit-core", "githubCorePackage": "microsoft/pxt-microbit-core", - "gittag": "v0.1.10", + "gittag": "v0.1.11", "serviceId": "ws" }, "serial": {