updated lessons
This commit is contained in:
@ -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!
|
||||
|
||||
|
@ -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:
|
||||
|
||||

|
||||
```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.
|
||||
|
||||

|
||||
|
||||
* 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.
|
||||
|
||||

|
||||
```blocks
|
||||
|
||||
basic.forever(() => {
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. . # . .
|
||||
. # # # .
|
||||
. . # . .
|
||||
. . . . .
|
||||
`)
|
||||
basic.showLeds(`
|
||||
. . # . .
|
||||
. # . # .
|
||||
# . . . #
|
||||
. # . # .
|
||||
. . # . .
|
||||
`)
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
. # . # .
|
||||
# # # # #
|
||||
. # . # .
|
||||
`)
|
||||
})
|
||||
|
||||
```
|
||||
|
||||
|
||||
* Run your program and see if it works.
|
||||
|
||||
|
@ -28,7 +28,24 @@ basic.forever(() => {
|
||||
|
||||

|
||||
|
||||

|
||||
```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(() => {
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. . # . .
|
||||
. # # # .
|
||||
. . # . .
|
||||
. . . . .
|
||||
`);
|
||||
basic.showLeds(`
|
||||
# # # # #
|
||||
# # . # #
|
||||
# . # . #
|
||||
# # . # #
|
||||
# # # # #
|
||||
`)
|
||||
});
|
||||
```
|
Reference in New Issue
Block a user