Migrate docs from the other repo

This commit is contained in:
Michal Moskal
2016-03-25 16:47:20 -07:00
parent 38d2cf06d2
commit a08eb53f92
895 changed files with 36888 additions and 0 deletions

View File

@ -0,0 +1,63 @@
# snowflake fall blocks activity
design a blinking rectangle animation. #docs #tutorials #stepByStep
### ~avatar avatar
### @video td/videos/snowflake-fall-0
Welcome! This tutorial will teach how design a **snowfall animation**. Let's get started!
### ~
Let's start by creating a `forever` loop that will allow us to repeat the show LEDs code. Any code in the `forever` loop will repeat in the background... forever.
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
})
```
The next step is to add two `show LEDs` blocks inside the `forever` loop to repeat an animation.
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .
`)
})
```blocks
Run your code in the simulator or download it to your BBC micro:bit to see what happens!
### ~avatar avatar
Excellent, you're ready to continue with the [challenges](/microbit/lessons/snowflake-fall/challenges)!
### ~

View File

@ -0,0 +1,34 @@
# snowflake fall blocks challenges
Coding challenges for snowflake fall.
## Before we get started
Complete the [snowflake fall](/microbit/lessons/snowflake-fall/activity) activity and your code will look like this:
![](/static/mb/blocks/lessons/snowflake-fall-1.jpg)
### Challenge 1
### @video td/videos/snowflake-fall-1
Let's begin creating our falling effect by adding another snowflake with `show LEDs` that displays a different snowflake pattern after the first one. We need 2 frames in the new animation that display both the first and the second snowflake images.
![](/static/mb/blocks/lessons/snowflake-fall-2.jpg)
* Run your program to see the cool animation.
### Challenge 2
### @video td/videos/snowflake-fall-2
To finalize our snowflake fall, let's add a different snowflake pattern.
![](/static/mb/blocks/lessons/snowflake-fall-3.jpg)
* Run your program and see if it works.
### Challenge 3
Add a fourth frame to the current animation... or make it your own!

View File

@ -0,0 +1,30 @@
# snowflake fall blocks quiz answers
Create a snowflake fall animation.
This is the answer key for the [snowflake fall quiz](/microbit/lessons/snowflake-fall/quiz).
## 1. What is a forever loop?
Run code in the background forever (answers may vary).
## 2. Draw the picture that will be produced with this code
![](/static/mb/blocks/lessons/snowflake-fall-4.png)
![](/static/mb/lessons/flashing-heart-0.png)
## 3.Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-0.png)
![](/static/mb/blocks/lessons/snowflake-fall-5.png)
## 4. Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-1.png)
![](/static/mb/lessons/snowflake-fall-2.png)
![](/static/mb/blocks/lessons/snowflake-fall-6.png)

View File

@ -0,0 +1,36 @@
# snowflake fall blocks quiz
Create a snowflake fall animation
## Name
## Directions
Use the hints in the [snowflake fall activity](/microbit/lessons/snowflake-fall/activity) to answer this quiz!
## 1. What is a forever loop?
<br />
## 2. Draw the picture that will be produced with this code
![](/static/mb/blocks/lessons/snowflake-fall-4.png)
![](/static/mb/empty-microbit.png)
<br/>
## 3. Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-0.png)
<br/>
## 4. Write the code for a forever loop and show LEDS for these images!
![](/static/mb/lessons/snowflake-fall-1.png)
![](/static/mb/lessons/snowflake-fall-2.png)
<br/>