updated lessons

This commit is contained in:
Michael Elliot Braun
2016-03-30 15:11:05 -07:00
parent f00491df52
commit 1e77491b16
22 changed files with 422 additions and 159 deletions

View File

@ -51,7 +51,7 @@ basic.forever(() => {
. . # . .
`)
})
```blocks
```
Run your code in the simulator or download it to your BBC micro:bit to see what happens!

View File

@ -6,25 +6,59 @@ Coding challenges for snowflake fall.
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)
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .
`)
})
```
### 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)
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`)
basic.showLeds(`
. . # . .
. # . # .
# . . . #
. # . # .
. . # . .
`)
basic.showLeds(`
. # . # .
# # # # #
. # . # .
# # # # #
. # . # .
`)
})
```
* Run your program and see if it works.

View File

@ -28,7 +28,24 @@ basic.forever(() => {
![](/static/mb/lessons/snowflake-fall-0.png)
![](/static/mb/blocks/lessons/snowflake-fall-5.png)
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`);
basic.showLeds(`
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
`)
});
```
## 4. Write the code for a forever loop and show LEDS for these images!
@ -36,5 +53,21 @@ basic.forever(() => {
![](/static/mb/lessons/snowflake-fall-2.png)
![](/static/mb/blocks/lessons/snowflake-fall-6.png)
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. . # . .
. # # # .
. . # . .
. . . . .
`);
basic.showLeds(`
# # # # #
# # . # #
# . # . #
# # . # #
# # # # #
`)
});
```