Include unplugged intro step in tutorials (#1376)
This commit is contained in:
		
				
					committed by
					
						
						Peli de Halleux
					
				
			
			
				
	
			
			
			
						parent
						
							55d2b9ea1e
						
					
				
				
					commit
					3a217e910e
				
			@@ -1,7 +1,11 @@
 | 
			
		||||
# Coin Flipper
 | 
			
		||||
 | 
			
		||||
## Introduction @unplugged
 | 
			
		||||
 | 
			
		||||
Let's create a coin flipping program to simulate a real coin toss. We'll use icon images to represent a ``heads`` or ``tails`` result.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Step 1
 | 
			
		||||
 | 
			
		||||
Get an ``||input:on button A pressed||`` block from the ``||input:Input||`` drawer in the toolbox. We'll put our coin flipping code in here.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,11 @@
 | 
			
		||||
# Flashing Heart
 | 
			
		||||
 | 
			
		||||
## Introduction @unplugged
 | 
			
		||||
 | 
			
		||||
Learn how to use the LEDs and make a flashing heart!
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Step 1 @fullscreen
 | 
			
		||||
 | 
			
		||||
Place the ``||basic:show leds||`` block in the ``||basic:on start||`` block and draw a heart.
 | 
			
		||||
@@ -26,16 +32,16 @@ basic.showLeds(`
 | 
			
		||||
    . # # # .
 | 
			
		||||
    . . # . .`);
 | 
			
		||||
basic.showLeds(`
 | 
			
		||||
    . # . # .
 | 
			
		||||
    # . # . #
 | 
			
		||||
    # . . . #
 | 
			
		||||
    . # . # .
 | 
			
		||||
    . . # . .`);
 | 
			
		||||
    . . . . .
 | 
			
		||||
    . . . . .
 | 
			
		||||
    . . . . .
 | 
			
		||||
    . . . . .
 | 
			
		||||
    . . . . .`);
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Step 3 @fullscreen
 | 
			
		||||
 | 
			
		||||
Move the blocks inside the ``||basic:forever||`` to repeat the animation.
 | 
			
		||||
But we only see the heart blink once. To have it continue to blink, move the blocks inside the ``||basic:forever||`` to make the animation repeat.
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
basic.forever(() => {
 | 
			
		||||
@@ -47,17 +53,18 @@ basic.forever(() => {
 | 
			
		||||
        . . # . .`
 | 
			
		||||
        );
 | 
			
		||||
    basic.showLeds(`
 | 
			
		||||
        . # . # .
 | 
			
		||||
        # . # . #
 | 
			
		||||
        # . . . #
 | 
			
		||||
        . # . # .
 | 
			
		||||
        . . # . .`);
 | 
			
		||||
        . . . . .
 | 
			
		||||
        . . . . .
 | 
			
		||||
        . . . . .
 | 
			
		||||
        . . . . .
 | 
			
		||||
        . . . . .`
 | 
			
		||||
        );
 | 
			
		||||
})
 | 
			
		||||
```
 | 
			
		||||
 | 
			
		||||
## Step 4 @fullscreen
 | 
			
		||||
 | 
			
		||||
Place more ``||basic:show leds||`` blocks to create your own animation.
 | 
			
		||||
Now let's get fancy and place more ``||basic:show leds||`` blocks to create your own animation.
 | 
			
		||||
 | 
			
		||||
```blocks
 | 
			
		||||
basic.forever(() => {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,11 @@
 | 
			
		||||
# Love Meter
 | 
			
		||||
 | 
			
		||||
## Introduction @unplugged
 | 
			
		||||
 | 
			
		||||
Make a love meter, how sweet! The @boardname@ is feeling the love, then sometimes not so much!
 | 
			
		||||
Tell everyone who you are. Show you name on the LEDs.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Step 1
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,11 @@
 | 
			
		||||
# Name Tag
 | 
			
		||||
 | 
			
		||||
## Introduction @unplugged
 | 
			
		||||
 | 
			
		||||
Tell everyone who you are. Show you name on the LEDs.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Step 1 @fullscreen
 | 
			
		||||
 | 
			
		||||
Place the ``||basic:show string||`` block in the ``||basic:on start||`` block. Change the text to your name.
 | 
			
		||||
 
 | 
			
		||||
@@ -1,5 +1,11 @@
 | 
			
		||||
# Smiley Buttons
 | 
			
		||||
 | 
			
		||||
## Introduction @unplugged
 | 
			
		||||
 | 
			
		||||
Code the buttons on the @boardname@ to show that it's happy or sad.
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
 | 
			
		||||
## Step 1 @fullscreen
 | 
			
		||||
 | 
			
		||||
Place a ``||input:on button pressed||`` block to run code when button **A** is pressed.
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								docs/static/mb/projects/coin-flipper/coin-flipper.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/static/mb/projects/coin-flipper/coin-flipper.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 60 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/static/mb/projects/flashing-heart/show-leds.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/static/mb/projects/flashing-heart/show-leds.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 41 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/static/mb/projects/love-meter/love-meter.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/static/mb/projects/love-meter/love-meter.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 277 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/static/mb/projects/name-tag/name-tag.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/static/mb/projects/name-tag/name-tag.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 199 KiB  | 
							
								
								
									
										
											BIN
										
									
								
								docs/static/mb/projects/smiley-buttons/smiley-buttons.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								docs/static/mb/projects/smiley-buttons/smiley-buttons.gif
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 50 KiB  | 
		Reference in New Issue
	
	Block a user