remove "to create new script..."
This commit is contained in:
@ -10,8 +10,6 @@ Welcome! This tutorial will teach you how to make a counter that increments when
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Let's start by creating a **local variable** `count` to keep track of the current count.
|
||||
|
||||
```
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
Create a die on the BBC micro:bit
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **KindScript**.
|
||||
|
||||
Let's create a condition for when the BBC micro:bit is shaken.
|
||||
|
||||
```
|
||||
|
@ -10,8 +10,6 @@ In this activity, you will learn how to blink an image on the LED screen.
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](https://www.microbit.co.uk/create-code) page and tap `New Project` under **KindScript**.
|
||||
|
||||
Let's start by adding code that plots a heart image on the screen using `basic->plot image`. Once you are done coding, don't forget to run your code in the simulator or the BBC micro:bit.
|
||||
|
||||
```
|
||||
|
@ -8,8 +8,6 @@ Welcome! This guided activity will teach how to construct a pendulum that glows
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Create a **forever** loop that will constantly display the appropriate brightness on the LED display.
|
||||
|
||||
```
|
||||
|
@ -10,8 +10,6 @@ Welcome! This tutorial will help you create a guess the number game! Let's get s
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap New Project under **Touch Develop**.
|
||||
|
||||
Add an event handler when button `A` is pressed.
|
||||
|
||||
```
|
||||
|
@ -10,8 +10,6 @@ Welcome! This tutorial will help you create a love meter with the BBC micro:bit.
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Begin by registering an event with `input->on pin pressed(PO)` to know when someone is holding pin ``P0`` and pin ``Gnd``.
|
||||
|
||||
```
|
||||
|
@ -10,8 +10,6 @@ Let's learn how to show the lucky number 7 on the LED screen.
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](https://www.microbit.co.uk/create-code) page and tap `New Project` under **Touch Develop**.
|
||||
|
||||
We will use `basic->show number` to display a number on the screen. The first argument (`7`) is the number to display and the second argument (`150`) is duration in milliseconds between column scroll. For example, you can reduce `150` to `100` to speed up the scrolling.
|
||||
|
||||
```
|
||||
|
@ -8,17 +8,15 @@ Welcome! This tutorial will help you create a magic 8 ball on the BBC micro:bit.
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Show a string to instruct the user how to play Magic 8! The magic 8 ball can only answer true or false questions.
|
||||
|
||||
```
|
||||
```blocks
|
||||
basic.showString("Ask a question", 150)
|
||||
```
|
||||
|
||||
Display the number 8.
|
||||
|
||||
```
|
||||
```blocks
|
||||
basic.showString("Ask a question", 150)
|
||||
basic.showNumber(8, 150)
|
||||
```
|
||||
@ -27,7 +25,7 @@ basic.showNumber(8, 150)
|
||||
|
||||
Register code to run when the BBC micro:bit is shaken.
|
||||
|
||||
```
|
||||
```blocks
|
||||
basic.showString("Ask a question", 150)
|
||||
basic.showNumber(8, 150)
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
@ -40,7 +38,7 @@ Set **x** equal to a random number with a limit of 3.
|
||||
|
||||
Remember the random function in the math library, picks a random number from 0 to the limit, but not including the limit unless it is 0.
|
||||
|
||||
```
|
||||
```blocks
|
||||
basic.showString("Ask a question", 150)
|
||||
basic.showNumber(8, 150)
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
@ -52,7 +50,7 @@ Create an if statement for the condition `if x= 2`.
|
||||
|
||||
If **x** is 2, display the string 'Yes'
|
||||
|
||||
```
|
||||
```blocks
|
||||
basic.showString("Ask a question", 150)
|
||||
basic.showNumber(8, 150)
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
@ -67,7 +65,7 @@ Create an if statement for the condition `if x = 1`.
|
||||
|
||||
If ``x`` is 1, display the string 'No'
|
||||
|
||||
```
|
||||
```blocks
|
||||
basic.showString("Ask a question", 150)
|
||||
basic.showNumber(8, 150)
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
|
@ -10,18 +10,16 @@ Welcome! This tutorial will help you create a game of rock paper scissors with t
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
We want the BBC micro:bit to choose rock, paper, or scissors when it is shaken. Let's begin by creating an `input->on shake` condition so the micro:bit will run code when it is shaken.
|
||||
|
||||
```
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
})
|
||||
```
|
||||
|
||||
Next, create an image that contains 3 frames: rock, paper, and scissors. We will control which image is shown with `offset`.
|
||||
|
||||
```
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
let img = images.createImage(`
|
||||
. . . . . # # # # # . . . . #
|
||||
@ -35,7 +33,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
The BBC micro:bit will look like it's showing 1 frame of the image by displaying the whole image with plot frame and math random. We can help the BBC micro:bit randomly decide which offset to using plot image by math random. The BBC micro:bit will randomly pick the image to display with plot image and the `math->random(3)` function.
|
||||
|
||||
```
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
let img1 = images.createImage(`
|
||||
. . . . . # # # # # . . . . #
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
create an arrow that randomly points to a player. #docs
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Let's begin by adding an `input->on shake` condition to know when the BBC micro:bit is shaken.
|
||||
|
||||
```
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
a multi-player game that forces each player to reveal a secret or something funny. #docs
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
Begin by plotting an "up-arrow" image, which will point to someone.
|
||||
|
||||
```
|
||||
|
@ -10,8 +10,6 @@ Welcome! This tutorial will teach how to measure the acceleration on the micro:b
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/create-code) page and tap *New Project* under **Touch Develop**.
|
||||
|
||||
We want to display the acceleration forever. In order to do so, we need a `basic->forever` loop.
|
||||
|
||||
```
|
||||
|
Reference in New Issue
Block a user