Small doc fixes and many tiny edits. (#439)

This commit is contained in:
Galen Nickel
2017-07-06 00:05:42 -07:00
committed by Peli de Halleux
parent edaf2b0403
commit 78d1ce26be
33 changed files with 164 additions and 118 deletions

View File

@ -6,7 +6,7 @@ Guide the students to create programs using coordinates and LEDs. Each of these
* Random Patterns generator - A short exercise using a loop to generate random LED patterns and then checking the status of a specific LED.
* Brightness - A short exercise in using the brightness settings for the micro:bit LEDs.
## Smile Animation
## Smile animation
A short exercise in plotting and toggling LEDs to create a simple animation.
* Though students can use the 'show leds' block for images and animation, there is another way to tell the micro:bit what LEDs to turn on and off using coordinates.
@ -79,7 +79,7 @@ led.plot(3, 3)
* Add a third image to the animation, perhaps a frown face.
* Make your own custom animation! What LEDs stay the same and which need to be toggled?
 
## Random Patterns generator
## Random patterns generator
A short exercise using a loop to generate random LED patterns and then checking the status of a specific LED.
Pseudocode:
* On button A pressed well use a loop to turn on a random set of LED lights on our micro:bit.
@ -129,7 +129,7 @@ input.onButtonPressed(Button.B, () => {
})
```
Try it out!
### Try it out!
* Download the program to your micro:bit
* Press button A to create a random pattern
* Press button B to check and display the status of the specific LED
@ -193,6 +193,6 @@ led.setBrightness(255)
basic.showIcon(IconNames.Heart)
```
Try it out!
### Try it out!
* What happens if adding 25 or subtracting 25 from the current brightness level would result in a sum or difference outside of the 0 to 255 brightness range?

View File

@ -11,7 +11,7 @@ Your task is to create:
1. A "screen saver" animation using the plot/unplot blocks. You can fill the screen line by line, pausing between each one, or fill it with a random constellation of stars.
OR
>-- OR --
1. A game that uses sprites to manage the x and y coordinate values of the different objects.
@ -19,7 +19,7 @@ Your project might use variables to store the values of sprites, which are speci
## Project Ideas
### Firework Screensaver
### Firework screensaver
This project uses a for loop with the plot/unplot blocks to create a symmetrical design on the screen. This student used a subtraction operation to get a variable that decreases as the index variable in the loop increases.
@ -40,7 +40,7 @@ basic.forever(() => {
})
```
### Cascade Screensaver
### Cascade screensaver
This example creates a diagonal cascading effect across the screen. Note the use of a variable (speed) to allow you to easily change the speed of the animation by changing just one number value.
@ -81,7 +81,7 @@ basic.forever(() => {
speed = 10
```
### Dodge Ball Game
### Dodge ball game
This is a Dodge Ball game that uses one sprite (dodger) to try to avoid another sprite (ball). You use the A and B buttons to move the dodger to avoid the balls that are falling from the top of the screen.
Here is the complete Dodge Ball program.

View File

@ -36,7 +36,7 @@ Since their grid is only one quarter the size of the original Battleship grid, s
The game can be played with just paper and pencils or you could use small tokens and markers, like coins, buttons, or paper clips to represent the ships.
 
Notes
### Notes:
* Place students grids in sheet protectors or laminate them so they can be used again and again with white board (dry erase) markers.
* The official rules of Battleship are easily found on the internet. Modify them as needed for your particular class.