diff --git a/docs/projects/step-counter.md b/docs/projects/step-counter.md index e5cb9a7d..2499ec92 100644 --- a/docs/projects/step-counter.md +++ b/docs/projects/step-counter.md @@ -2,8 +2,7 @@ ![A @boardname@ attached on a foot](/static/mb/projects/step-counter.png) -This project turns the @boardname@ into a simple step-counter. -Each **shake** event increment a **counter** variable. +This project turns the @boardname@ into a simple step counter. A step counter is also known as a pedometer. Each **shake** event increments a **counter** variable. The step count is displayed on the LEDs. ## ~ hint @@ -13,7 +12,7 @@ If you built a watch in the [make](/projects/watch/make) portion of the of the [ ## A counter -To build a counter, we will need a variable to store the number of steps. +To build a counter, we'll need a variable to store the number of steps. ```blocks let step = 0 @@ -22,7 +21,7 @@ step = 0 ## Detecting a step -Assuming you attach the @boardname@ to your foot, it will get shaken up when do a step. We can use the ``||input:on shake||`` event to detect a step (it should work most of the time). Let's add the code to increment ``step`` by 1 when @boardname@ is shaken. +Assuming you attach the @boardname@ to your foot or ankle, it will get shaken when you take a step. We can use the ``||input:on shake||`` event to detect a step (it should notice a step most of the time). Let's add the code to increment ``step`` by `1` when the @boardname@ is shaken. ```blocks let step = 0 @@ -34,8 +33,7 @@ step = 0 ## How many steps so far? -We want to see the number of steps at all time. In a ``||basic:forever||`` loop, -we add a ``||basic:show number||`` block to display the value of ``step``. +We want to always see how many steps were counted. In a ``||basic:forever||`` loop, we add a ``||basic:show number||`` block to display the value of ``step``. ```blocks let step = 0 @@ -50,9 +48,7 @@ step = 0 ## Display lag -Did you notice there is a lag in the display of steps? -This is because the ``step`` value can change **while** the @boardname@ is displaying a number. -To remove the lag, add ``||led:stop animation||`` after changing the value of ``step``. +Did you notice there is a lag, or delay, in the display of steps? This is because the ``step`` value can change **while** the @boardname@ is displaying a number. To remove the lag, add ``||led:stop animation||`` after changing the value of ``step``. ```blocks let step = 0 diff --git a/docs/projects/stopwatch.md b/docs/projects/stopwatch.md index 4f8193ab..990c1e44 100644 --- a/docs/projects/stopwatch.md +++ b/docs/projects/stopwatch.md @@ -27,9 +27,9 @@ This is the _rough_ outline of the code: >When a user presses **A**, we start by determining which state we're in. ->If the watch is stopped, (``start time`` is 0 and this means we're in **state 1**), we start the counter and store the current time. The watch now goes from **state 1** to **state 2**. +>If the watch is stopped, (``start_time`` is `0` and this means we're in **state 1**), we start the counter and store the current time. The watch now goes from **state 1** to **state 2**. ->If the watch is running (``start time`` is not 0 and this means we're in **state 2**), we calculate the time duration and reset ``start time`` to 0. The watch goes back from **state 2** to **state 1**. +>If the watch is running (``start_time`` is not `0` and this means we're in **state 2**), we calculate the time duration and reset ``start_time`` to `0`. The watch goes back from **state 2** to **state 1**. The ``||input:running time||`` block returns the number of **milli**-seconds elapsed since the @boardname@ was turned on. To compute the duration in seconds, we use the following formula: