From 40863518921963c51a76b6aa6c6b47695cece829 Mon Sep 17 00:00:00 2001 From: Kiki Date: Fri, 27 Dec 2024 10:50:24 -0800 Subject: [PATCH] Changed Triangle bullets to Diamond --- docs/projects/v2-blow-away.md | 109 +++++++++++++++++----------- docs/projects/v2-cat-napping.md | 48 ++++++------ docs/projects/v2-clap-lights.md | 28 +++---- docs/projects/v2-countdown.md | 28 +++---- docs/projects/v2-morse-chat.md | 44 +++++------ docs/projects/v2-pet-hamster.md | 22 +++--- docs/projects/v2-play-sound-long.md | 12 +-- docs/projects/v2-play-sound.md | 8 +- 8 files changed, 163 insertions(+), 136 deletions(-) diff --git a/docs/projects/v2-blow-away.md b/docs/projects/v2-blow-away.md index bf1d94e27fb..178f5e925ac 100644 --- a/docs/projects/v2-blow-away.md +++ b/docs/projects/v2-blow-away.md @@ -12,9 +12,11 @@ For this tutorial, we'll learn how to blow Haven away 🌬️ A wild Haven has appeared! -► From the ``||basic:Basic||`` category, find ``||basic:show icon [ ]||`` and add it to your ``||basic:on start||`` container. -► Click the heart icon and set it to show a ghost. -💡 In the ``show icon`` dropdown menu options, you can hover to see what each design is called. +♦︎ From the ``||basic:Basic||`` category, find ``||basic:show icon [ ]||`` and add it to your ``||basic:on start||`` container. + +♦︎ Click the heart icon and set it to show a ghost. + +💡 _In the ``show icon`` dropdown menu options, you can hover to see what each design is called._ ```blocks // @highlight @@ -25,8 +27,9 @@ basic.showIcon(IconNames.Ghost) ## {Loop setup} -► From the ``||loops:Loops||`` category, find the ``||loops:repeat [4] times||`` loop and snap it into your empty ``||basic:forever||`` container. -💡 Why do we need a [__*repeat loop*__](#repeatLoop "repeat code for a given number of times") when we already have a ``forever`` container? Because ``forever`` has an embedded delay that we want to avoid! +♦︎ From the ``||loops:Loops||`` category, find the ``||loops:repeat [4] times||`` loop and snap it into your empty ``||basic:forever||`` container. + +💡_Why do we need a [__*repeat loop*__](#repeatLoop "repeat code for a given number of times") when we already have a ``forever`` container? Because ``forever`` has an embedded delay that we want to avoid!_ ```blocks basic.forever(function () { @@ -41,9 +44,11 @@ basic.forever(function () { Haven hates noise and will blow away if things get too loud. Let's use an [__*if statement*__](#ifstatement "if this condition is met, do something") to check for sounds. -► From ``||logic:Logic||``, grab an ``||logic:if then||`` statement and snap it into your empty ``||loops:repeat [4] times do||`` loop. -► Go back to ``||logic:Logic||`` to get a ``||logic:<[0] [=] [0]>||`` comparison. -► Snap ``||logic:<[0] [=] [0]>||`` in to **replace** the ``||logic:||`` condition for your ``||logic:if then||`` statement. +♦︎ From ``||logic:Logic||``, grab an ``||logic:if then||`` statement and snap it into your empty ``||loops:repeat [4] times do||`` loop. + +♦︎ Go back to ``||logic:Logic||`` to get a ``||logic:<[0] [=] [0]>||`` comparison. + +♦︎ Snap ``||logic:<[0] [=] [0]>||`` in to **replace** the ``||logic:||`` condition for your ``||logic:if then||`` statement. ```blocks basic.forever(function () { @@ -61,10 +66,13 @@ basic.forever(function () { We'll be using a [__*sound threshold*__](#soundThreshold "a number for how loud a sound needs to be to trigger an event. 0 = silence to 255 = maximum noise") to act as Haven's ears. -► From the ``||input:Input||`` category, drag ``||input:sound level||`` in to **replace** the **_left_ ``0``** of your ``||logic:<[0] [=] [0]>||`` comparison. -► Using the dropdown in the **middle** of ``||logic:[sound level] [=] [0]||``, change the comparison to be **``>``** (greater than). -► Finally, have the **right side** of the comparison say ``128`` so your full comparison reads: **``sound level > 128``**. -💡 This means Haven will hear any sound above ``128``. +♦︎ From the ``||input:Input||`` category, drag ``||input:sound level||`` in to **replace** the _left_ **``0``** of your ``||logic:<[0] [=] [0]>||`` comparison. + +♦︎ Using the dropdown in the **middle** of ``||logic:[sound level] [=] [0]||``, change the comparison to be **``>``** (greater than). + +♦︎ Finally, have the **right side** of the comparison say ``128`` so your full comparison reads: **``sound level > 128``**. + +💡 _This means Haven will hear any sound above ``128``._ ```blocks basic.forever(function () { @@ -81,18 +89,22 @@ basic.forever(function () { Let's create some [__*variables*__](#variable "a holder for information that may change") to keep track of Haven's movement. -► In the ``||variables:Variables||`` category, click on ``Make a Variable...`` and make a variable named ``col``. -💡 ``col`` is short for "column". -► Make **another** variable and name it ``row``. +♦︎ In the ``||variables:Variables||`` category, click on ``Make a Variable...`` and make a variable named ``col``. (💡 _ **``col``** is short for "column"._) + +♦︎ Make **another** variable and name it ``row``. + ## {Displacing LEDs part 1} To show Haven is blowing away, we want to move a random set of lights sideways. -► Your ``||variables:Variables||`` category should now have the option to ``||variables:set [row] to [0]||``. Drag that block into your empty ``||logic:if then||`` statement. -► From the ``||math:Math||`` category, find ``||math:pick random [0] to [10]||`` and snap that in to **replace** the ``[0]`` in your ``||variables:set [row] to [0]||`` block. -► Change the maximum number from ``10`` to **``4``**. -💡 We are setting the maximum random value to 4 because the lights on the @boardname@ are numbered 0, 1, 2, 3, and 4 for columns and rows. +♦︎ Your ``||variables:Variables||`` category should now have the option to ``||variables:set [row] to [0]||``. Drag that block into your empty ``||logic:if then||`` statement. + +♦︎ From the ``||math:Math||`` category, find ``||math:pick random [0] to [10]||`` and snap that in to **replace** the ``[0]`` in your ``||variables:set [row] to [0]||`` block. + +♦︎ Change the maximum number from ``10`` to **``4``**. + +💡 _We are setting the maximum random value to 4 because the lights on the @boardname@ are numbered 0, 1, 2, 3, and 4 for columns and rows._ ```blocks let row = 0 @@ -108,10 +120,13 @@ basic.forever(function () { ## {Displacing LEDs part 2} -► Go back into ``||variables:Variables||`` and drag out another ``||variables:set [row] to [0]||``. Place this one below the last one (at **the end**) of your `if then` statement. -► Using the **dropdown menu**, set the new block to read ``||variables:set [col] to [0]||``. -► From the ``||math:Math||`` category, grab another ``||math:pick random [0] to [10]||`` and snap that in to **replace** the ``[0]`` in your ``||variables:set [col] to [0]||`` block. -► Change the maximum number from ``10`` to **``4``**. +♦︎ Go back into ``||variables:Variables||`` and drag out another ``||variables:set [row] to [0]||``. Place this one below the last one (at **the end**) of your `if then` statement. + +♦︎ Using the **dropdown menu**, set the new block to read ``||variables:set [col] to [0]||``. + +♦︎ From the ``||math:Math||`` category, grab another ``||math:pick random [0] to [10]||`` and snap that in to **replace** the ``[0]`` in your ``||variables:set [col] to [0]||`` block. + +♦︎ Change the maximum number from ``10`` to **``4``**. ```blocks let col = 0 @@ -131,9 +146,12 @@ basic.forever(function () { Time to move some lights around! -► From ``||logic:Logic||``, grab another ``||logic:if then||`` and snap it at the **inside and at the bottom of** your ``||loops:repeat [4] times do||`` loop, right below your ``||logic:if [sound level] [>] [128]||`` statement. -► From the ``||led:Led||`` category, find ``||led:point x [0] y [0]||`` and drag it in to **replace** the ``||logic:||`` condition in the **new** ``||logic:if then||`` statement. -💡 This block will test if the light is on at the the given ``x`` and ``y`` coordinate points. + +♦︎ From ``||logic:Logic||``, grab another ``||logic:if then||`` and snap it at the **inside and at the bottom of** your ``||loops:repeat [4] times do||`` loop, right below your ``||logic:if [sound level] [>] [128]||`` statement. + +♦︎ From the ``||led:Led||`` category, find ``||led:point x [0] y [0]||`` and drag it in to **replace** the ``||logic:||`` condition in the new ``||logic:if then||`` statement. + +💡 _This block will test if the light is on at the the given ``x`` and ``y`` coordinate points._ ```blocks let col = 0 @@ -154,8 +172,9 @@ basic.forever(function () { To create the animation effect of Haven blowing away, we will turn off (or ``unplot``) a light that is on and then turn it on again (``plot`` it) in a different spot. -► From ``||led:Led||``, grab ``||led:unplot x [0] y [0]||`` and snap it inside the **empty** ``||logic:if then||`` statement. -► Go back to ``||led:Led||`` and get ``||led:plot x [0] y [0]||``. Snap that in **beneath** the ``||led:unplot x [0] y [0]||`` block that you just added. +♦︎ From ``||led:Led||``, grab ``||led:unplot x [0] y [0]||`` and snap it inside the **empty** ``||logic:if then||`` statement. + +♦︎ Go back to ``||led:Led||`` and get ``||led:plot x [0] y [0]||``. Snap that in **beneath** the ``||led:unplot x [0] y [0]||`` block that you just added. ```blocks let col = 0 @@ -178,11 +197,13 @@ basic.forever(function () { ## Setting variables Notice how you have **three** blocks from the ``||led:Led||`` category. All three have ``||led:x||`` ``[0]`` and ``||led:y||`` ``[0]`` coordinates. In these **two** steps, we will set it so that every ``||led:x||`` is followed by the ``||variables:col||`` variable and every ``||led:y||`` is followed by the ``||variables:row||`` variable. -► From ``||variables:Variables||``, get three copies of ``||variables:col||``, and use them to **replace the ``x`` values** in the following three blocks: -**1.** ``||led:point x [0] y [0]||`` -**2.** ``||led:unplot x [0] y [0]||`` -**3.** ``||led:plot x [0] y [0]||`` -► Go into ``||variables:Variables||``, get three copies of ``||variables:row||``, and use them to **replace the ``y`` values** in the same three blocks. + +♦︎ From ``||variables:Variables||``, get three copies of ``||variables:col||``, and use them to **replace the ``x`` values** in the following three blocks: +**1.** ``||led(noclick):point x [0] y [0]||`` +**2.** ``||led(noclick):unplot x [0] y [0]||`` +**3.** ``||led(noclick):plot x [0] y [0]||`` + +♦︎ Go into ``||variables:Variables||``, get three copies of ``||variables:row||``, and use them to **replace the ``y`` values** in the same three blocks. ```blocks let col = 0 @@ -206,10 +227,13 @@ basic.forever(function () { Right now, we are unplotting and replotting in the same spot. What we want to do is move the lights we're turning back on just a smidge to the right every time until there's nothing left on the grid. -► From ``||math:Math||``, find the ``||math:[0] [+] [0]||`` operation and use it to **replace** ``||variables:col||`` in your ``||led:plot x [col] y [row]||`` block. -💡 If you move your entire ``||basic:forever||`` container, you should find a greyed out ``col`` variable in your workspace. -► Take the greyed out ``||variables:col||`` variable (or get a new one) and use it to **replace** the **_first_ ``[0]``** so the operation reads ``||math:[col] [+] [0]||``. -► Replace the **_second_ ``[0]``** with **``[1]``** so the operation reads ``||math:[col] [+] [1]||``. +♦︎ From ``||math:Math||``, find the ``||math:[0] [+] [0]||`` operation and use it to **replace** ``||variables(noclick):col||`` in your ``||led(noclick):plot x [col] y [row]||`` block. + +💡 _If you move your entire ``||basic:forever||`` container, you should find a greyed out ``col`` variable in your workspace._ + +♦︎ Take the greyed out ``||variables:col||`` variable (or get a new one) and use it to **replace** the **_first_ ``[0]``** so the operation reads ``||math:[col] [+] [0]||``. + +♦︎ Replace the **_second_ ``[0]``** with **``[1]``** so the operation reads ``||math:[col] [+] [1]||``. ```blocks let col = 0 @@ -233,10 +257,13 @@ basic.forever(function () { Check out the simulator! -► Click on the pink bar underneath the microphone icon. Drag it above the sound number you chose (we used ``128``!) to blow Haven away. -► If you have a new @boardname@ (the one with the **shiny gold** logo at the top), download this code and try it out! -💡 Blow close to the @boardname@ and watch Haven swoosh away 💨 -💡 Use your @boardname@'s reset button (it's on the back!) to bring Haven back 👻 +♦︎ Click on the reddish bar to the right of the micro:bit. Drag it up until the number is higher than the sound level you chose (we used ``128``!) + +♦︎ If you have a new @boardname@ (the one with the **shiny gold** logo at the top), download this code and try it out! + +💡_Blow close to the @boardname@ and watch Haven swoosh away_ 💨 + +💡_Use your @boardname@'s reset button (it's on the back!) to bring Haven back_ 👻 ```blocks let col = 0 diff --git a/docs/projects/v2-cat-napping.md b/docs/projects/v2-cat-napping.md index 3df24640e77..6af64ad6de9 100644 --- a/docs/projects/v2-cat-napping.md +++ b/docs/projects/v2-cat-napping.md @@ -10,9 +10,9 @@ Lychee the cat loves the sun and wants to know if your home has a good sunbathin First, we want to make sure we know when our micro:bit is collecting data. To do this, let's create a [__*boolean*__](#boolean "something that is only true or false") [__*variable*__](#variable "a holder for information that may change") and use it to track when the @boardname@ is logging data. We'll start with the logging variable set to false. -► In the ``||variables:Variables||`` category, click on ``Make a Variable...`` and make a variable named ``logging``. -► From the ``||variables:Variables||`` category, grab the ``||variables:set [logging] to [0]||`` block and snap it into the empty ``||basic:on start||`` container. -► From the ``||logic:Logic||`` category, grab a ``||logic:||`` argument and snap it in to **replace** the ``||variables:[0]||`` value in your ``||variables:set [logging] to [0]||`` statement. +♦︎ In the ``||variables:Variables||`` category, click on ``Make a Variable...`` and make a variable named ``logging``. +♦︎ From the ``||variables:Variables||`` category, grab the ``||variables:set [logging] to [0]||`` block and snap it into the empty ``||basic:on start||`` container. +♦︎ From the ``||logic:Logic||`` category, grab a ``||logic:||`` argument and snap it in to **replace** the ``||variables:[0]||`` value in your ``||variables:set [logging] to [0]||`` statement. ```blocks let logging = false @@ -23,8 +23,8 @@ logging = false Let's give Lychee some control over when she wants to start and stop logging data on the @boardname@. -► From the ``||input:Input||`` category, grab a ``||input:on button [A] pressed||`` container and drag it into your workspace. Then, grab a ``||variables:set [logging] to [0]||`` block from ``||variables:Varables||`` and snap it inside of your ``||input:on button [A] pressed||`` container. -► From the ``||logic:Logic||`` category, grab a ``||logic:||`` argument and snap it in to **replace** the ``0`` argument. Go back to the ``||variables:Variables||`` category, grab a ``||variables:logging||`` variable and snap it in to **replace** the empty ``||logic:<>||`` in the ``||logic:not <>||`` statement. +♦︎ From the ``||input:Input||`` category, grab a ``||input:on button [A] pressed||`` container and drag it into your workspace. Then, grab a ``||variables:set [logging] to [0]||`` block from ``||variables:Varables||`` and snap it inside of your ``||input:on button [A] pressed||`` container. +♦︎ From the ``||logic:Logic||`` category, grab a ``||logic:||`` argument and snap it in to **replace** the ``0`` argument. Go back to the ``||variables:Variables||`` category, grab a ``||variables:logging||`` variable and snap it in to **replace** the empty ``||logic:<>||`` in the ``||logic:not <>||`` statement. ✋🛑 Take a moment to help Lychee answer the following question: _What is happening every time she presses the A button?_ @@ -39,8 +39,8 @@ input.onButtonPressed(Button.A, function () { It would help to know when the @boardname@ is logging data and when it isn't. For this step, we will be building out a visual indicator using an [__*if then / else*__](#ifthenelse "runs some code if a boolean condition is true and different code if the condition is false") statement. -► From the ``||logic:Logic||`` category, grab an ``||logic:if then / else||`` statement and snap it in at the **bottom** of your ``||input:on button [A] pressed||`` container. -► From ``||variables:Variables||``, grab a ``||variables:logging||`` variable and snap it in to **replace** the ``||logic:||`` condition in your ``||logic:if then / else||`` statement. +♦︎ From the ``||logic:Logic||`` category, grab an ``||logic:if then / else||`` statement and snap it in at the **bottom** of your ``||input:on button [A] pressed||`` container. +♦︎ From ``||variables:Variables||``, grab a ``||variables:logging||`` variable and snap it in to **replace** the ``||logic:||`` condition in your ``||logic:if then / else||`` statement. ```blocks let logging = false @@ -54,8 +54,8 @@ input.onButtonPressed(Button.A, function () { ## {Set the indicator icon} -► Let's display an image when the @boardname@ is logging data. From the ``||basic:Basic||`` category, grab a ``||basic:show icon [ ]||`` block and snap it into the empty **top container** of your ``||logic:if then / else||`` statement. -► Set it to show the "target" icon (it looks like an empty sun - scroll down to find it!). This will show whenever your @boardname@ is collecting data. +♦︎ Let's display an image when the @boardname@ is logging data. From the ``||basic:Basic||`` category, grab a ``||basic:show icon [ ]||`` block and snap it into the empty **top container** of your ``||logic:if then / else||`` statement. +♦︎ Set it to show the "target" icon (it looks like an empty sun - scroll down to find it!). This will show whenever your @boardname@ is collecting data. 💡 In the ``show icon`` dropdown menu options, you can hover to see what each design is called. ```blocks @@ -73,8 +73,8 @@ input.onButtonPressed(Button.A, function () { Let's now add an auditory indicator that your @boardname@ is logging data! -► From the ``||music:Music||`` category, grab a ``||music:play sound [dadadum] [in background]||`` block and snap it into the **bottom** of the **top container** of your ``||logic:if then / else||`` statement. -► Click on the ``[dadadum]`` dropdown and select ``nyan``, then set the playback mode to ``||music:[until done]||``. Your block should now say ``||music:play melody [nyan] [until done]||``. +♦︎ From the ``||music:Music||`` category, grab a ``||music:play sound [dadadum] [in background]||`` block and snap it into the **bottom** of the **top container** of your ``||logic:if then / else||`` statement. +♦︎ Click on the ``[dadadum]`` dropdown and select ``nyan``, then set the playback mode to ``||music:[until done]||``. Your block should now say ``||music:play melody [nyan] [until done]||``. ```blocks let logging = false @@ -90,7 +90,7 @@ input.onButtonPressed(Button.A, function () { ## {Logging off indicator} -► Let's clear the board when the @boardname@ is not logging data. From the ``||basic:Basic||`` category, grab a ``||basic:clear screen||`` block and snap it into the empty **bottom container** of your ``||logic:if then / else||`` statement. +♦︎ Let's clear the board when the @boardname@ is not logging data. From the ``||basic:Basic||`` category, grab a ``||basic:clear screen||`` block and snap it into the empty **bottom container** of your ``||logic:if then / else||`` statement. ```blocks let logging = false @@ -109,8 +109,8 @@ input.onButtonPressed(Button.A, function () { Let's set up the data logging for Lychee! In order to get Lychee a good amount of data without running out of memory, we should collect one data point for her every minute. -► From the ``||loops:Loops||`` category, grab a ``||loops:every [500] ms||`` container and add it to your workspace. -► Click on the the ``500`` dropdown and select ``1 minute``.
+♦︎ From the ``||loops:Loops||`` category, grab a ``||loops:every [500] ms||`` container and add it to your workspace. +♦︎ Click on the the ``500`` dropdown and select ``1 minute``.
💡 1 minute is equivalent to 60000ms, which is what the number will automatically change to. ```blocks @@ -122,8 +122,8 @@ loops.everyInterval(60000, function () { Now, let's use an [__*if then*__](#ifthen "runs some code if a boolean condition is true") statement to track when the @boardname@ is logging data. -► From the ``||logic:Logic||`` category, grab a ``||logic:if then||`` statement and snap it into your ``||loops:every [600000] ms||`` container. -► From the ``||variables:Variables||`` category, drag out a ``||variables:logging||`` variable and snap it in to **replace** the ``||logic:||`` argument in the ``||logic:if then||`` statement. +♦︎ From the ``||logic:Logic||`` category, grab a ``||logic:if then||`` statement and snap it into your ``||loops:every [600000] ms||`` container. +♦︎ From the ``||variables:Variables||`` category, drag out a ``||variables:logging||`` variable and snap it in to **replace** the ``||logic:||`` argument in the ``||logic:if then||`` statement. ```blocks let logging = false @@ -137,9 +137,9 @@ loops.everyInterval(60000, function () { Lychee loves her sun spots because they provide a nice, sunny and warm place to nap. So, we'll need to measure the **temperature** and **light** in different places around the house. -► From the ``||datalogger:Data Logger||`` category, grab a ``||datalogger:log data [column [""] value [0]] +||`` block and snap it **inside** the ``||logic:if [logging] then||`` statement. -► Click on the ``""`` after the word ``column`` and type in "``temp``". -► From the ``||input:Input||`` category, select the ``||input:temperature (°C)||`` parameter and drag it in to **replace** the ``0`` after the word ``value``. +♦︎ From the ``||datalogger:Data Logger||`` category, grab a ``||datalogger:log data [column [""] value [0]] +||`` block and snap it **inside** the ``||logic:if [logging] then||`` statement. +♦︎ Click on the ``""`` after the word ``column`` and type in "``temp``". +♦︎ From the ``||input:Input||`` category, select the ``||input:temperature (°C)||`` parameter and drag it in to **replace** the ``0`` after the word ``value``. ```blocks let logging = false @@ -155,9 +155,9 @@ loops.everyInterval(60000, function () { ## {Setting up logging - Part 2} -► On the right of the ``||input:temperature (°C)||`` input that you just snapped in, there is a ➕ button. Click on it. You should now see a new row that says ``||datalogger:column [""] value [0]||``. -► Click on the empty ``""`` after the word ``column`` and type in "``light``". -► From the ``||input:Input||`` category, select the ``||input:light level||`` parameter and drag it in to **replace** the ``0`` parameter after the word ``value``. +♦︎ On the right of the ``||input:temperature (°C)||`` input that you just snapped in, there is a ➕ button. Click on it. You should now see a new row that says ``||datalogger:column [""] value [0]||``. +♦︎ Click on the empty ``""`` after the word ``column`` and type in "``light``". +♦︎ From the ``||input:Input||`` category, select the ``||input:light level||`` parameter and drag it in to **replace** the ``0`` parameter after the word ``value``. ```blocks let logging = false @@ -176,8 +176,8 @@ loops.everyInterval(60000, function () { You did it! If you have a @boardname@ V2 (the one with the **shiny gold** logo at the top), download this code and try it out! -► Find a sun spot in your house and press the ``A`` button to start logging data - your display should show an icon and play a sound to indicate that you are logging data. -► After some time (we recommend at least an hour), press the ``A`` button again to stop logging data - your display should clear to indicate that you are not logging data. +♦︎ Find a sun spot in your house and press the ``A`` button to start logging data - your display should show an icon and play a sound to indicate that you are logging data. +♦︎ After some time (we recommend at least an hour), press the ``A`` button again to stop logging data - your display should clear to indicate that you are not logging data. ## {Reviewing your data @unplugged} diff --git a/docs/projects/v2-clap-lights.md b/docs/projects/v2-clap-lights.md index e73a774fa8e..b846829a2e4 100644 --- a/docs/projects/v2-clap-lights.md +++ b/docs/projects/v2-clap-lights.md @@ -10,7 +10,7 @@ Let's learn how to use a clap 👏 to switch your @boardname@'s lights on and of ## {Setting up the sound input} -► From the ``||input:Input||`` category, find the ``||input:on [loud] sound||`` container and add it to your workspace. +♦︎ From the ``||input:Input||`` category, find the ``||input:on [loud] sound||`` container and add it to your workspace. ```blocks // @highlight @@ -23,14 +23,14 @@ input.onSound(DetectedSound.Loud, function () { Let's begin by creating a [__*variable*__](#variable "a holder for information that may change") to keep track of whether the @boardname@'s lights are on or off. -► In the ``||variables:Variables||`` category, click on ``Make a Variable...`` and make a variable named ``lightsOn``. +♦︎ In the ``||variables:Variables||`` category, click on ``Make a Variable...`` and make a variable named ``lightsOn``. ## {Displaying LEDs part 1} In this step, we'll be using an [__*if then / else*__](#ifthenelse "runs some code if a Boolean condition is true and different code if the condition is false") statement. -► From the ``||logic:Logic||`` category, grab an ``||logic:if then / else||`` block and snap it into your ``||input:on [loud] sound||`` container. -► Look in the ``||variables:Variables||`` category. Find the new ``||variables:lightsOn||`` variable and snap it in to **replace** the ``||logic:||`` value in your ``||logic:if then / else||`` statement. +♦︎ From the ``||logic:Logic||`` category, grab an ``||logic:if then / else||`` block and snap it into your ``||input:on [loud] sound||`` container. +♦︎ Look in the ``||variables:Variables||`` category. Find the new ``||variables:lightsOn||`` variable and snap it in to **replace** the ``||logic:||`` value in your ``||logic:if then / else||`` statement. ```blocks let lightsOn = 0 @@ -46,8 +46,8 @@ input.onSound(DetectedSound.Loud, function () { ## {Displaying LEDs part 2} -► From ``||basic:Basic||``, grab ``||basic:show leds||`` and snap it into the **top container** of your ``||logic:if then / else||`` statement. -► Set the lights to a pattern you like! +♦︎ From ``||basic:Basic||``, grab ``||basic:show leds||`` and snap it into the **top container** of your ``||logic:if then / else||`` statement. +♦︎ Set the lights to a pattern you like! 💡 In the hint, we chose to turn on all of the outside lights. Feel free to make your own design 🎨 ```blocks @@ -69,7 +69,7 @@ input.onSound(DetectedSound.Loud, function () { ## {Clearing the screen} -► From ``||basic:Basic||``, find ``||basic:clear screen||`` and snap it into the **bottom container** of your ``||logic:if then / else||`` section. +♦︎ From ``||basic:Basic||``, find ``||basic:clear screen||`` and snap it into the **bottom container** of your ``||logic:if then / else||`` section. 💡 This will turn the display off if ``lightsOn`` is **not** ``true``. ```blocks @@ -94,9 +94,9 @@ input.onSound(DetectedSound.Loud, function () { Just like we'd toggle a light switch, each time we clap, we want to **flip** the variable ``lightsOn`` to the **opposite** of what it was before. -► From ``||variables:Variables||``, locate ``||variables:set [lightsOn] to [0]||`` and snap it in at the **very top** of your ``||input:on [loud] sound||`` container. -► From the ``||logic:Logic||`` category, find the ``||logic:not <>||`` operator and use it to **replace the ``[0]``** in ``||variables:set [lightsOn] to [0]||``. -► From ``||variables:Variables||``, grab ``||variables:lightsOn||`` and snap it into the **empty part** of the ``||logic:not <>||`` operator. +♦︎ From ``||variables:Variables||``, locate ``||variables:set [lightsOn] to [0]||`` and snap it in at the **very top** of your ``||input:on [loud] sound||`` container. +♦︎ From the ``||logic:Logic||`` category, find the ``||logic:not <>||`` operator and use it to **replace the ``[0]``** in ``||variables:set [lightsOn] to [0]||``. +♦︎ From ``||variables:Variables||``, grab ``||variables:lightsOn||`` and snap it into the **empty part** of the ``||logic:not <>||`` operator. ```blocks let lightsOn = false @@ -119,16 +119,16 @@ input.onSound(DetectedSound.Loud, function () { ## {Testing in the simulator} -► Check out the simulator! -► Click on the pink slider bar beneath the microphone icon and drag it up and down. +♦︎ Check out the simulator! +♦︎ Click on the pink slider bar beneath the microphone icon and drag it up and down. 💡 Right now, your @boardname@ thinks that anything above 128 is loud. Every time the sound goes > 128, your lights should switch on/off. ## {Set loud sound threshold} Your @boardname@ might detect sounds when you don't want it to. Setting a [__*sound threshold*__](#soundThreshold "a number for how loud a sound needs to be to trigger an event. 0 = silence to 255 = maximum noise") could help 🔉🔊 -► Click on the ``||input:Input||`` category. A new category should show up beneath it called ``||input:...more||``. -► From ``||input:...more||``, grab ``||input:set [loud] sound threshold to [128]||`` and snap it into your **empty** ``||basic:on start||`` container. +♦︎ Click on the ``||input:Input||`` category. A new category should show up beneath it called ``||input:...more||``. +♦︎ From ``||input:...more||``, grab ``||input:set [loud] sound threshold to [128]||`` and snap it into your **empty** ``||basic:on start||`` container. 💡 Try to change the value of your sound threshold so that every time you clap, your lights will turn on if they are off and vice versa. ```blocks diff --git a/docs/projects/v2-countdown.md b/docs/projects/v2-countdown.md index f434f8e6470..06e9fc80068 100644 --- a/docs/projects/v2-countdown.md +++ b/docs/projects/v2-countdown.md @@ -13,8 +13,8 @@ Let's create a musical countdown using the new @boardname@ with sound! We'll begin by using a [__*for loop*__](#forLoop "repeat code for a given number of times using an index") to recreate the same sound 3 times. -► From the ``||loops:Loops||`` category in your toolbox, find the ``||loops:for [index] from 0 to [4]||`` loop and add it to your ``||basic:on start||`` container. -► Change your loop to count from ``0`` to **``2``**. +♦︎ From the ``||loops:Loops||`` category in your toolbox, find the ``||loops:for [index] from 0 to [4]||`` loop and add it to your ``||basic:on start||`` container. +♦︎ Change your loop to count from ``0`` to **``2``**. 💡 This means the loop will count 0-1-2 instead of what we want, which is 3-2-1. We will worry about this later! ```blocks @@ -26,9 +26,9 @@ for (let index = 0; index <= 2; index++) { ## {Play music} -► From ``||music:Music||``, grab ``||music:play tone [Middle C] for [1 beat] [until done]||`` and snap it into your empty ``for`` loop. +♦︎ From ``||music:Music||``, grab ``||music:play tone [Middle C] for [1 beat] [until done]||`` and snap it into your empty ``for`` loop. 💡 Your simulator might start playing music. You can mute it if distracting. -► 1 beat is a little long. Use the **dropdown** to set the tone to play for ``||music:1/4 beat||``. +♦︎ 1 beat is a little long. Use the **dropdown** to set the tone to play for ``||music:1/4 beat||``. ```blocks for (let index = 0; index <= 2; index++) { @@ -41,9 +41,9 @@ for (let index = 0; index <= 2; index++) { With every tone, we also want to **display** our countdown. -► From ``||basic:Basic||``, find ``||basic:show number [0]||`` and snap it in at the **bottom** of your ``for`` loop. -► From your ``||loops:for [index] from 0 to [2]||`` loop condition, click and drag out the **red** ``||variables:index||`` variable. -► Use the ``||variables:index||`` that you dragged out to **replace** the ``0`` in ``||basic:show number [0]||``. +♦︎ From ``||basic:Basic||``, find ``||basic:show number [0]||`` and snap it in at the **bottom** of your ``for`` loop. +♦︎ From your ``||loops:for [index] from 0 to [2]||`` loop condition, click and drag out the **red** ``||variables:index||`` variable. +♦︎ Use the ``||variables:index||`` that you dragged out to **replace** the ``0`` in ``||basic:show number [0]||``. ```blocks for (let index = 0; index <= 2; index++) { @@ -57,11 +57,11 @@ for (let index = 0; index <= 2; index++) { If you take a look at your simulator, you'll notice the @boardname@ flashing 0-1-2. We want it to say 3-2-1! Let's learn a trick to change that. -► From the ``||math:Math||`` category, snap ``||math:[0] - [0]||`` in to **replace** ``||variables:index||`` in your ``||basic:show number [index]||`` block. +♦︎ From the ``||math:Math||`` category, snap ``||math:[0] - [0]||`` in to **replace** ``||variables:index||`` in your ``||basic:show number [index]||`` block. 💡 You should now have a greyed out ``index`` variable in your workspace. We'll use that in the next step. -► Pick up the greyed out ``||variables:index||`` variable and snap it in to the **right side** of your ``||math:[0] - [0]||`` operator. +♦︎ Pick up the greyed out ``||variables:index||`` variable and snap it in to the **right side** of your ``||math:[0] - [0]||`` operator. 💡 Can't find ``||variables:index||``? Try moving your ``||basic:on start||`` container to see if ``||variables: index||`` is hiding behind it! -► Set the **left side** of your ``||math:[0]-[index]||`` operator to **``3``**. +♦︎ Set the **left side** of your ``||math:[0]-[index]||`` operator to **``3``**. 💡 Why does this work? Every time we loop, our ``index`` variable will grow by 1 and our @boardname@ will output: 3-0 = **3** ➡️ 3-1 = **2** ➡️ 3-2 = **1**! ```blocks @@ -74,8 +74,8 @@ for (let index = 0; index <= 2; index++) { ## {Printing "GO!"} -► From ``||basic:Basic||``, grab ``||basic:show string ["Hello!"]||`` and snap it into the **very bottom** of your ``||basic:on start||`` container. -► Replace ``Hello!`` with the word ``GO!`` +♦︎ From ``||basic:Basic||``, grab ``||basic:show string ["Hello!"]||`` and snap it into the **very bottom** of your ``||basic:on start||`` container. +♦︎ Replace ``Hello!`` with the word ``GO!`` ```blocks for (let index = 0; index <= 2; index++) { @@ -88,9 +88,9 @@ basic.showString("GO!") ## {Adding a "GO!" noise} -► From the ``||music:Music||`` category, grab ``||music:play tone [Middle C] for [1 beat] [until done]||`` and place it **above** your ``||basic:show string ["GO!"]||`` block and **below** your ``||loops:for||`` loop. +♦︎ From the ``||music:Music||`` category, grab ``||music:play tone [Middle C] for [1 beat] [until done]||`` and place it **above** your ``||basic:show string ["GO!"]||`` block and **below** your ``||loops:for||`` loop. 💡 This will let your @boardname@ play the sound and show ``GO!`` at the same time. -► Set the ``||music:tone||`` to be ``Middle G``. +♦︎ Set the ``||music:tone||`` to be ``Middle G``. 💡 ``Middle G`` is also tone ``392``. ```blocks diff --git a/docs/projects/v2-morse-chat.md b/docs/projects/v2-morse-chat.md index aea25eacac5..1a27e338ae0 100644 --- a/docs/projects/v2-morse-chat.md +++ b/docs/projects/v2-morse-chat.md @@ -10,8 +10,8 @@ Luckily, you can use your @boardname@ with sound to talk to Sky 👋 ## {Setup} -► From the ``||input:Input||`` category in the toolbox, drag an ``||input:on logo [pressed]||`` container into to your workspace. -► From the ``||radio:Radio||`` category, get ``||radio:radio send number [0]||`` and snap it into your empty ``||input:on logo [pressed]||`` container. +♦︎ From the ``||input:Input||`` category in the toolbox, drag an ``||input:on logo [pressed]||`` container into to your workspace. +♦︎ From the ``||radio:Radio||`` category, get ``||radio:radio send number [0]||`` and snap it into your empty ``||input:on logo [pressed]||`` container. ```blocks input.onLogoEvent(TouchButtonEvent.Pressed, function () { @@ -21,9 +21,9 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () { ## {Sending different messages pt. 1} -► From ``||input:Input||``, grab **another** ``||input:on logo [pressed]||`` container and add it to your workspace. +♦︎ From ``||input:Input||``, grab **another** ``||input:on logo [pressed]||`` container and add it to your workspace. 💡 This container is greyed out because it matches another. Let's change that! -► On the greyed-out ``||input:on logo [pressed]||`` container, click on the **``pressed``** dropdown and set it to ``||input:long pressed||``. +♦︎ On the greyed-out ``||input:on logo [pressed]||`` container, click on the **``pressed``** dropdown and set it to ``||input:long pressed||``. ```blocks // @highlight @@ -36,8 +36,8 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () { ## {Sending different messages pt. 2} -► From the ``||radio:Radio||`` category, get a ``||radio:radio send number [0]||`` block and snap it into your **empty** ``||input:on logo [long pressed]||`` container. -► Set the number to be ``1``. +♦︎ From the ``||radio:Radio||`` category, get a ``||radio:radio send number [0]||`` block and snap it into your **empty** ``||input:on logo [long pressed]||`` container. +♦︎ Set the number to be ``1``. ```blocks input.onLogoEvent(TouchButtonEvent.LongPressed, function () { @@ -53,9 +53,9 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () { To ensure Sky gets the right message, we will use an [__*if then / else*__](#ifthenelse "runs some code if a boolean condition is true and different code if the condition is false") conditional statement. -► From ``||radio:Radio||``, find the ``||radio:on radio received [receivedNumber]||`` container and add it to your workspace. -► From ``||logic:Logic||``, grab an ``||logic:if then / else||`` statement and snap it into your **new** ``||radio:on radio received [receivedNumber]||`` container. -► Go back to the ``||logic:Logic||`` category, grab ``||logic:<[0] [=] [0]>||``, and click it in to **replace** the ``||logic:||`` argument in your ``||logic:if then / else||`` statement. +♦︎ From ``||radio:Radio||``, find the ``||radio:on radio received [receivedNumber]||`` container and add it to your workspace. +♦︎ From ``||logic:Logic||``, grab an ``||logic:if then / else||`` statement and snap it into your **new** ``||radio:on radio received [receivedNumber]||`` container. +♦︎ Go back to the ``||logic:Logic||`` category, grab ``||logic:<[0] [=] [0]>||``, and click it in to **replace** the ``||logic:||`` argument in your ``||logic:if then / else||`` statement. ```blocks radio.onReceivedNumber(function (receivedNumber) { @@ -70,8 +70,8 @@ radio.onReceivedNumber(function (receivedNumber) { ## {Conditioning on the input} -► From your ``||radio:on radio received [receivedNumber]||`` container, grab the **``receivedNumber``** input and drag out a copy. -► Use your copy of **``receivedNumber``** to replace the ``[0]`` on the **left side** of ``||logic:<[0] [=] [0]>||``. +♦︎ From your ``||radio:on radio received [receivedNumber]||`` container, grab the **``receivedNumber``** input and drag out a copy. +♦︎ Use your copy of **``receivedNumber``** to replace the ``[0]`` on the **left side** of ``||logic:<[0] [=] [0]>||``. ```blocks radio.onReceivedNumber(function (receivedNumber) { @@ -86,8 +86,8 @@ radio.onReceivedNumber(function (receivedNumber) { ## {Displaying a message pt. 1} -► We want to display a dash if the logo is long pressed. From ``||basic:Basic||``, grab ``||basic:show leds||`` and snap it into the empty **bottom container** of your ``||logic:if then / else||`` statement. -► Turn on 3 LEDs in a row to be a dash: - +♦︎ We want to display a dash if the logo is long pressed. From ``||basic:Basic||``, grab ``||basic:show leds||`` and snap it into the empty **bottom container** of your ``||logic:if then / else||`` statement. +♦︎ Turn on 3 LEDs in a row to be a dash: - ```blocks radio.onReceivedNumber(function (receivedNumber) { @@ -107,7 +107,7 @@ radio.onReceivedNumber(function (receivedNumber) { ## {Playing a sound pt. 1} -► From the ``||music:Music||`` category, grab a ``||music:play tone [Middle C] for [1 beat] [until done]||`` block and snap it at the **end** of the **bottom container** in your ``||logic:if then / else||`` statement. +♦︎ From the ``||music:Music||`` category, grab a ``||music:play tone [Middle C] for [1 beat] [until done]||`` block and snap it at the **end** of the **bottom container** in your ``||logic:if then / else||`` statement. ```blocks radio.onReceivedNumber(function (receivedNumber) { @@ -128,8 +128,8 @@ radio.onReceivedNumber(function (receivedNumber) { ## {Displaying a message pt. 2} -► We want to display a dot if the logo is pressed. From ``||basic:Basic||``, grab another ``||basic:show leds||`` and snap it into the **top container** of your ``||logic:if then / else||`` statement. -► Turn on a single LED to make a dot: . +♦︎ We want to display a dot if the logo is pressed. From ``||basic:Basic||``, grab another ``||basic:show leds||`` and snap it into the **top container** of your ``||logic:if then / else||`` statement. +♦︎ Turn on a single LED to make a dot: . ```blocks radio.onReceivedNumber(function (receivedNumber) { @@ -157,8 +157,8 @@ radio.onReceivedNumber(function (receivedNumber) { ## {Playing a sound pt. 2} -► From the ``||music:Music||`` category, grab ``||music:play tone [Middle C] for [1 beat] [until done]||`` and snap it in at the **end** of the **top container** in your ``||logic:if then / else||`` statement. -► Dots are shorter than dashes! Set the tone to play for ``1/4 beat``. +♦︎ From the ``||music:Music||`` category, grab ``||music:play tone [Middle C] for [1 beat] [until done]||`` and snap it in at the **end** of the **top container** in your ``||logic:if then / else||`` statement. +♦︎ Dots are shorter than dashes! Set the tone to play for ``1/4 beat``. ```blocks radio.onReceivedNumber(function (receivedNumber) { @@ -187,7 +187,7 @@ radio.onReceivedNumber(function (receivedNumber) { ## {Clearing the screens} -► From ``||basic:Basic||``, find ``||basic:clear screen||`` and snap it in at the **very bottom** of your ``||radio:on radio received [receivedNumber]||`` container. +♦︎ From ``||basic:Basic||``, find ``||basic:clear screen||`` and snap it in at the **very bottom** of your ``||radio:on radio received [receivedNumber]||`` container. ```blocks radio.onReceivedNumber(function (receivedNumber) { @@ -221,7 +221,7 @@ radio.onReceivedNumber(function (receivedNumber) { Test what you've created. Remember to turn your sound on! -► Touch the gold **micro:bit logo** at the top of your @boardname@ on the simulator. You'll notice that a second @boardname@ appears. This is the @boardname@ for Sky 🐖 +♦︎ Touch the gold **micro:bit logo** at the top of your @boardname@ on the simulator. You'll notice that a second @boardname@ appears. This is the @boardname@ for Sky 🐖 💡 If your screen is too small, you might not be able to see it. ```blocks @@ -259,10 +259,10 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () { ## {Testing in the simulator - Send message} -► Touch the logo again to send messages to Sky 🐖 +♦︎ Touch the logo again to send messages to Sky 🐖 **Press** to send a dot. **Long press** (count to 3!) to send a dash. -► If you have multiple @boardname@s with sound (they have **shiny gold** logos at the top), download this code and try it out! +♦︎ If you have multiple @boardname@s with sound (they have **shiny gold** logos at the top), download this code and try it out! ```blocks radio.onReceivedNumber(function (receivedNumber) { diff --git a/docs/projects/v2-pet-hamster.md b/docs/projects/v2-pet-hamster.md index 1d3e3af45c1..da816a9ea28 100644 --- a/docs/projects/v2-pet-hamster.md +++ b/docs/projects/v2-pet-hamster.md @@ -8,7 +8,7 @@ Cyrus is a very sleepy hamster. In fact, Cyrus is almost always sleeping. -► From the ``||basic:Basic||`` category, find ``||basic:show icon [ ]||`` and snap it into your ``||basic:on start||`` container. Set it to show the asleep ``-_-`` face. +♦︎ From the ``||basic:Basic||`` category, find ``||basic:show icon [ ]||`` and snap it into your ``||basic:on start||`` container. Set it to show the asleep ``-_-`` face. 💡 In the ``show icon`` dropdown menu options, you can hover to see what each design is called! ```blocks @@ -20,8 +20,8 @@ basic.showIcon(IconNames.Asleep) Pressing Cyrus's logo tickles them! -► From ``||input:Input||``, find the ``||input:on logo [pressed]||`` container and drag it into your workspace. -► Go to ``||basic:Basic||`` and grab **another** ``||basic:show icon [ ]||``. Snap it into your **empty** ``||input:on logo [pressed]||`` container. Set the icon (Cyrus's face) to happy ``:)``. +♦︎ From ``||input:Input||``, find the ``||input:on logo [pressed]||`` container and drag it into your workspace. +♦︎ Go to ``||basic:Basic||`` and grab **another** ``||basic:show icon [ ]||``. Snap it into your **empty** ``||input:on logo [pressed]||`` container. Set the icon (Cyrus's face) to happy ``:)``. ```blocks //@highlight @@ -33,7 +33,7 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () { ## {Tickle sound} -► From the ``||music:Music||`` category, get a ``||music:play [melody jump up] [in background]||`` and add it to the **bottom** of your ``||input:on logo [pressed]||`` container. Change the playback mode to ``||music:[until done]||``. +♦︎ From the ``||music:Music||`` category, get a ``||music:play [melody jump up] [in background]||`` and add it to the **bottom** of your ``||input:on logo [pressed]||`` container. Change the playback mode to ``||music:[until done]||``. ```blocks input.onLogoEvent(TouchButtonEvent.Pressed, function () { @@ -47,8 +47,8 @@ input.onLogoEvent(TouchButtonEvent.Pressed, function () { Whenever Cyrus is shaken, they get sad 🙁 -► From ``||input:Input||``, find ``||input:on [shake]||`` and drag it into your workspace. -► From the ``||basic:Basic||`` category, grab ``||basic:show icon [ ]||`` and snap it into your **new** ``||input:on [shake]||`` container. Set the icon (Cyrus's face) to sad ``:(``. +♦︎ From ``||input:Input||``, find ``||input:on [shake]||`` and drag it into your workspace. +♦︎ From the ``||basic:Basic||`` category, grab ``||basic:show icon [ ]||`` and snap it into your **new** ``||input:on [shake]||`` container. Set the icon (Cyrus's face) to sad ``:(``. ```blocks //@highlight @@ -60,8 +60,8 @@ input.onGesture(Gesture.Shake, function () { ## {Dizzy sound} -► From the ``||music:Music||`` category, find the ``||music:play [melody dadadum] [in background]||`` block and add it to the **bottom** of your ``||input:on [shake]||`` container. Change the playback mode to ``||music:[until done]||``. -► Click on the **dropdown** and set it so Cyrus plays a sad sound until done. +♦︎ From the ``||music:Music||`` category, find the ``||music:play [melody dadadum] [in background]||`` block and add it to the **bottom** of your ``||input:on [shake]||`` container. Change the playback mode to ``||music:[until done]||``. +♦︎ Click on the **dropdown** and set it so Cyrus plays a sad sound until done. ```blocks input.onGesture(Gesture.Shake, function () { @@ -75,8 +75,8 @@ input.onGesture(Gesture.Shake, function () { Let's ensure that Cyrus will always go back to sleep after being shaken or tickled. -► Right click the ``||basic:show icon[-_-]||`` block in your workspace (inside the ``||basic:on start||`` container) and choose **Duplicate**. -► Snap your copied block in at the **very bottom** of your ``||input:on [shake]||`` container. +♦︎ Right click the ``||basic:show icon[-_-]||`` block in your workspace (inside the ``||basic:on start||`` container) and choose **Duplicate**. +♦︎ Snap your copied block in at the **very bottom** of your ``||input:on [shake]||`` container. ```blocks input.onGesture(Gesture.Shake, function () { @@ -94,7 +94,7 @@ basic.showIcon(IconNames.Asleep) ## {Cyrus's default face pt. 2} -► Duplicate the ``||basic:show icon[-_-]||`` block again and this time snap it in at the **very bottom** of your ``||input:on logo [pressed]||`` container. +♦︎ Duplicate the ``||basic:show icon[-_-]||`` block again and this time snap it in at the **very bottom** of your ``||input:on logo [pressed]||`` container. ```blocks input.onGesture(Gesture.Shake, function () { diff --git a/docs/projects/v2-play-sound-long.md b/docs/projects/v2-play-sound-long.md index 29bcf083c01..e9f1b28c0ff 100644 --- a/docs/projects/v2-play-sound-long.md +++ b/docs/projects/v2-play-sound-long.md @@ -15,9 +15,9 @@ Let's find out what numbers the micro:bit produces when you move it around. --- -⇼ Open the ``||serial:^ Advanced||`` category to show the ``||serial:Serial||`` label. +♦︎ Open the ``||serial:^ Advanced||`` category to show the ``||serial:Serial||`` label. -⇼ From ``||serial:Serial||``, drag the ``||serial:serial write value ["x"] = [0]||`` +♦︎ From ``||serial:Serial||``, drag the ``||serial:serial write value ["x"] = [0]||`` block into the ``||basic:forever||`` loop container. @@ -51,11 +51,11 @@ with the micro:bit **acceleration** value. --- -⇼ Open the ``||input:Input||`` category and drag ``||input:acceleration (mg) [x]||`` +♦︎ Open the ``||input:Input||`` category and drag ``||input:acceleration (mg) [x]||`` over to replace "0" in the ``||serial:serial write value ["x"] = [0]||`` block. -⇼ Change "x" to "a" (for "acceleration".) +♦︎ Change "x" to "a" (for "acceleration".) @@ -85,11 +85,11 @@ the micro:bit **acceleration** value. --- -⇼ Open the ``||input:Input||`` category and drag ``||input:acceleration (mg) [x]||`` +♦︎ Open the ``||input:Input||`` category and drag ``||input:acceleration (mg) [x]||`` over to replace "0" in the ``||serial:serial write value ["x"] = [0]||`` block. -⇼ Change "x" to "a" (for "acceleration".) +♦︎ Change "x" to "a" (for "acceleration".) diff --git a/docs/projects/v2-play-sound.md b/docs/projects/v2-play-sound.md index f44be2a3e4c..d70af9dedc0 100644 --- a/docs/projects/v2-play-sound.md +++ b/docs/projects/v2-play-sound.md @@ -15,7 +15,7 @@ To start your electronic beat, you'll want to repeat a sound forever. --- -⇼ Open the ``||music:Music||`` category and drag the ``||music:play sound [♫ ∿∿∿∿ +] [until done]||`` +♦︎ Open the ``||music:Music||`` category and drag the ``||music:play sound [♫ ∿∿∿∿ +] [until done]||`` block into the empty ``||basic:forever||`` loop container. @@ -48,10 +48,10 @@ micro:bit **acceleration** value in the sound block. --- -⇼ On the ``||music:play sound [♫ ∿∿∿ +] [until done]||`` block, click the plus icon (**+**) +♦︎ On the ``||music:play sound [♫ ∿∿∿ +] [until done]||`` block, click the plus icon (**+**) to show the start frequency value of 5000. -⇼ From the ``||input:Input||`` category, drag the ``||input:acceleration (mg) [x]||`` +♦︎ From the ``||input:Input||`` category, drag the ``||input:acceleration (mg) [x]||`` value block to replace **5000**. @@ -80,7 +80,7 @@ You can make the beat even more fun by changing the end frequency as the micro:b --- -⇼ From the ``||input:...more||`` category, drag the ``||input:rotation (°) [pitch]||`` +♦︎ From the ``||input:...more||`` category, drag the ``||input:rotation (°) [pitch]||`` value block to replace the frequency **0**.