Compare commits
77 Commits
Author | SHA1 | Date | |
---|---|---|---|
8ab0dc450a | |||
4afc887ee5 | |||
db4692843f | |||
ad98c1aaa6 | |||
6ff9652450 | |||
6182a80f41 | |||
06e59c8d02 | |||
b9f17c3143 | |||
10e3fdf007 | |||
9a50050f7c | |||
63ac41c4b4 | |||
602ebacb0b | |||
4e55c0439e | |||
965deb5711 | |||
c24aba739b | |||
c55263889b | |||
fc7325b0f6 | |||
e46e02ad5e | |||
7d12ee0cb4 | |||
6b339fdc15 | |||
8bb3f74f09 | |||
aaf1513793 | |||
3d813a8716 | |||
53724c4b63 | |||
eb7582bb56 | |||
162902fabc | |||
12dbdf8530 | |||
ac90b16825 | |||
f7531ea9b0 | |||
8c00942c39 | |||
18e637aa28 | |||
d28efb3b84 | |||
2e49901a7e | |||
981f67b581 | |||
1f7a32da6b | |||
e545ae948a | |||
dc6386da52 | |||
c908794d23 | |||
8e27d596aa | |||
9b46145391 | |||
3182f7c546 | |||
8aed8548cc | |||
5e10bd7cc9 | |||
fddb9ff0d8 | |||
a0a0554633 | |||
df92a3daae | |||
26985f2813 | |||
e7fd68e7ee | |||
e63b764568 | |||
ef821e4b8b | |||
b7a547c2b4 | |||
43d600ab38 | |||
b38145e46a | |||
b29f8faa14 | |||
e58dd64780 | |||
b1028abb04 | |||
9f0f63a79e | |||
1c403e4ddb | |||
9143b34d9d | |||
f5a41d7c37 | |||
57c8698b58 | |||
4e3ed27f93 | |||
41977f087e | |||
c1a4a55e2b | |||
abc9e90cb9 | |||
3119bcc625 | |||
905da373c0 | |||
05dce8efce | |||
cbfc960594 | |||
c2c765098d | |||
9daf6ad9fc | |||
0c05ae9b64 | |||
27ea7cae56 | |||
80f9c52bac | |||
afef607ccf | |||
45fe7e6bb4 | |||
8e66b041e2 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -13,3 +13,4 @@ win10/app/bld
|
||||
*.tgz
|
||||
*.db
|
||||
*.suo
|
||||
*.log
|
@ -5,6 +5,7 @@ script:
|
||||
- "node node_modules/pxt-core/built/pxt.js travis"
|
||||
- "(cd libs/lang-test0; node ../../node_modules/pxt-core/built/pxt.js run)"
|
||||
- "node node_modules/pxt-core/built/pxt.js uploaddoc"
|
||||
- "(cd libs/hello; node ../../node_modules/pxt-core/built/pxt.js testconv ../../testconv.json)"
|
||||
sudo: false
|
||||
notifications:
|
||||
email:
|
||||
|
@ -16,9 +16,11 @@ that wraps codemicrobit.com and provides additional features.
|
||||
|
||||
### Sideloading
|
||||
|
||||
Find the latest build under ``win10/app/AppPackages/latest`` and run the ``Add-AppDevPackage.ps1`` PowerShell script.
|
||||
* Open Windows **settings** and search for **Developer options**
|
||||
* Enable the developer mode.
|
||||
* Find the latest build under ``win10/app/AppPackages/latest`` and run the ``Add-AppDevPackage.ps1`` PowerShell script (mouse right-click, then `run with PowerShell`)
|
||||
|
||||
### Building
|
||||
|
||||
* Install Visual Studio 2015 Update 2 or higher. Make sure the Windows 10 templates are installed.
|
||||
* open the ``win10/app.sln`` solution and launch the ``codemicrobit`` project.
|
||||
* open the ``win10/app.sln`` solution and launch the ``codemicrobit`` project.
|
||||
|
@ -2,6 +2,24 @@
|
||||
basic.forever(() => {
|
||||
basic.showString("Hi!");
|
||||
})
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
led.stopAnimation();
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`);
|
||||
});
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
led.stopAnimation();
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# . # . #
|
||||
# . . . #
|
||||
. # . # .
|
||||
. . # . .`);
|
||||
});
|
||||
```
|
||||
# About
|
||||
|
||||
@ -32,34 +50,6 @@ which flashes the micro:bit device with the new program.
|
||||
Before a student compiles her code for the micro:bit, she can run it using the micro:bit simulator, all within the confines of a web browser.
|
||||
The simulator has support for the LED screen, buttons, as well as compass, accelerometer, and digital I/O pins.
|
||||
|
||||
```sim
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. # . # .
|
||||
. . . . .
|
||||
# . . . #
|
||||
. # # # .`);
|
||||
});
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# . # . #
|
||||
# . . . #
|
||||
. # . # .
|
||||
. . # . .`);
|
||||
});
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. # . # .
|
||||
. . . . .
|
||||
. # # # .
|
||||
# . . . #`);
|
||||
});
|
||||
basic.showString("BBC micro:bit");
|
||||
```
|
||||
|
||||
## C++ Runtime
|
||||
|
||||
The [C++ BBC micro:bit runtime](http://lancaster-university.github.io/microbit-docs/), created at [Lancaster University](http://www.lancaster.ac.uk/), provides access to the hardware functions of the micro:bit,
|
||||
|
133
docs/device.md
133
docs/device.md
@ -4,121 +4,80 @@ All the bits and pieces that make up your BBC micro:bit
|
||||
|
||||

|
||||
|
||||
### Lights
|
||||
### LED Screen and Status LED
|
||||
|
||||
### What are the red lights on the front?
|
||||
The red lights are [LEDs](/device/screen) (light emitting diodes) and form a 5 x 5 LED Screen.
|
||||
They can be set to on/off and the brightness can be controlled.
|
||||
|
||||
The red lights are [LEDs](/microbit/device/screen) (light emitting diodes) and form a 5 x 5 grid. They can be set to on/off and the brightness can be controlled.
|
||||
|
||||
### What is the yellow light on the back of the micro:bit?
|
||||
|
||||
It is the status LED. It flashes yellow when the system wants to tell the user that something has happened.
|
||||
The yellow light on the back of the micro:bit is the status LED.
|
||||
It flashes yellow when the system wants to tell the user that something has happened.
|
||||
|
||||
### Buttons
|
||||
|
||||
### What are the buttons for?
|
||||
Buttons A and B are a form of input. When you press a button, it completes an electrical circuit.
|
||||
The micro:bit can detect either of its two buttons being pressed and un-pressed and be programmed
|
||||
to act on that or send the information to another device.
|
||||
|
||||
Buttons A and B are a form of input. They detect when the button is being pressed. When you press one of the buttons, it completes an electrical circuit. The micro:bit can detect either of its two buttons being pressed and un-pressed and be programmed to act on that or send the information to another device.
|
||||
Button R on the back of the micro:bit is a system button. It has different uses.
|
||||
When you have downloaded and run your code onto your micro:bit, press Button R to restart and run your program from the beginning.
|
||||
|
||||
Button R on the back of the micro:bit is a system button. It has different uses. When you have downloaded and run your code onto your micro:bit, press Button R to restart and run your program from the beginning.
|
||||
|
||||
When you plug in your micro:bit, it should appear as MICROBIT. If you accidentally hold down the reset button as you’re plugging in your micro:bit, the micro:bit will appear as a MAINTENANCE drive instead of MICROBIT. This is known as maintenance mode.**
|
||||
When you plug in your micro:bit, it should appear as MICROBIT.
|
||||
If you accidentally hold down the reset button as you’re plugging in your micro:bit,
|
||||
the micro:bit will appear as a MAINTENANCE drive instead of MICROBIT. This is known as maintenance mode.**
|
||||
|
||||
To continue programming your micro:bit YOU MUST unplug your USB and reconnect it. Check that the drive now shows as MICROBIT.
|
||||
|
||||
**Use with caution. If you click on the drive while it shows as MAINTENANCE, you can see which version of firmware you have running on your micro:bit. Firmware on your micro:bit should be up-to-date already. You can find the version of firmware in the 'version.txt' file on the micro:bit. Further information on the firmware can be found here:
|
||||
**Use with caution. If you click on the drive while it shows as MAINTENANCE,
|
||||
you can see which version of firmware you have running on your micro:bit.
|
||||
Firmware on your micro:bit should be up-to-date already.
|
||||
You can find the version of firmware in the 'version.txt' file on the micro:bit. Further information on the firmware can be found here:
|
||||
|
||||
https://developer.mbed.org/platforms/Microbit/#firmware
|
||||
|
||||
### Compass
|
||||
|
||||
### Why is there a compass on the micro:bit?
|
||||
|
||||
The compass can detect magnetic fields such as the Earth’s magnetic field. As the micro:bit has this compass, it is possible to detect the direction it is moving in. The micro:bit can detect where it is facing and movement in degrees. This data can be used by the micro:bit in a program or be sent to another device.
|
||||
The compass can detect magnetic fields such as the Earth’s magnetic field.
|
||||
As the micro:bit has this compass, it is possible to detect the direction it is moving in.
|
||||
The micro:bit can detect where it is facing and movement in degrees.
|
||||
This data can be used by the micro:bit in a program or be sent to another device.
|
||||
|
||||
### Accelerometer
|
||||
|
||||
### Why is there an accelerometer on the micro:bit?
|
||||
There is a an accelerometer on your micro:bit which detects changes in the micro:bit’s speed.
|
||||
It converts analogue information into digital form that can be used in micro:bit programs.
|
||||
Output is in milli-g. The device will also detect a small number of standard actions e.g. shake, tilt and free-fall.
|
||||
|
||||
There is a an accelerometer on your micro:bit which detects changes in the micro:bit’s speed. It converts analogue information into digital form that can be used in micro:bit programs. Output is in milli-g. The device will also detect a small number of standard actions e.g. shake, tilt and free-fall.
|
||||
### Pins
|
||||
|
||||
### PINS
|
||||
|
||||
### What are the rings labelled 0, 1, 2 on the bottom edge of the micro:bit?
|
||||
|
||||
These are labels for the input/output pins P0, P1, P2, which you can attach external sensors to such as thermometers or moisture detectors. The pins can be a form of input or output. You can read more about large and small pins [here](/microbit/device/pins).
|
||||
The pins can be a form of input or output.
|
||||
There are labels for the input/output pins P0, P1, P2, which you can attach external sensors to such as thermometers or moisture detectors.
|
||||
You can read more about large and small pins [here](/device/pins).
|
||||
|
||||
### How do I connect the micro:bit to my computer?
|
||||
|
||||
It can be connected to your computer or device with a micro USB. Data can be sent and received between the micro:bit and the computer so programs can be downloaded from Windows and Macs onto the micro:bit via this USB data connection. You can read more information on how to run scripts on your micro:bit [here](/microbit/device/usb), and about the error messages you might get [here](/microbit/device/error-codes).
|
||||
Your micro:bit can be connected to your computer via a micro USB cable.
|
||||
Data can be sent and received between the micro:bit and the computer so programs
|
||||
can be downloaded from Windows, Macs and Chromebooks onto the micro:bit via this USB data connection.
|
||||
You can read more information on how to run scripts on your micro:bit [here](/device/usb),
|
||||
and about the error messages you might get [here](/device/error-codes).
|
||||
|
||||
### Batteries
|
||||
### Powering your micro:bit
|
||||
|
||||
### How do I power my micro:bit?
|
||||
When your micro:bit is connected to your computer with the micro USB, it doesn’t need another power source.
|
||||
When your micro:bit isn’t connected to your computer, tablet or mobile, you will need 2 x AAA 1.5 V batteries to power it.
|
||||
|
||||
When your micro:bit is connected to your computer with the micro USB, it doesn’t need another power source. When your micro:bit isn’t connected to your computer, tablet or mobile, you will need 2 x AAA 1.5 V batteries to power it.
|
||||
The pins labelled 3V and GND are the power supply pins.
|
||||
You can attach an external device such as a motor to these and power it using the battery or USB.
|
||||
|
||||
### 3V GND
|
||||
### Bluetooth Low Energy Antenna
|
||||
|
||||
### What are the rings labelled 3V and GND?
|
||||
|
||||
The pins labelled 3V and GND are the power supply pins. You can attach an external device such as a motor to these and power it using the battery or USB.
|
||||
|
||||
### What is a Bluetooth Low Energy Antenna?
|
||||
|
||||
You will see this labelled BLE ANNTENA on the back of your micro:bit. It is for a messaging service, built for the Internet of Things so that devices can talk to each other. The micro:bit is a peripheral device which can talk to a central device like a smart phone or tablet that has Bluetooth Low Energy (BLE). The micro:bit can send signals and receive signals from a central device so another BLE device can control the micro:bit or the micro:bit can control another BLE device.
|
||||
|
||||
### What is Bluetooth Low Energy?
|
||||
|
||||
Bluetooth wireless technology was developed as an alternative to data cables and allowed wireless communication between devices such as PCs, smartphones and tablets. Bluetooth® Smart or Bluetooth Low Energy is a power-friendly version of Bluetooth wireless technology.
|
||||
|
||||
### What is the Internet of Things?
|
||||
|
||||
The Internet of Things (IoT) was first talked about more than 15 years ago, when it was speculated that objects and people would be able to connect wirelessly over the internet. Objects can be detected and controlled remotely, allowing greater integration between the physical and computer based world. It will let you to remotely control your alarm system, thermostat or lights in your home. It has many applications in different fields including manufacturing, health and fitness, consumer electronics and the home.
|
||||
You will see the label BLE ANNTENA on the back of your micro:bit. It is for a messaging service,
|
||||
so that devices can talk to each other. The micro:bit is a peripheral
|
||||
device which can talk to a central device like a smart phone or tablet that has Bluetooth Low Energy (BLE).
|
||||
The micro:bit can send signals and receive signals from a central device so another BLE device can
|
||||
control the micro:bit or the micro:bit can control another BLE device.
|
||||
|
||||
### Technical Information
|
||||
|
||||
The micro:bit has been designed to be a bare-board micro controller for use by children aged 11-12. The device has been through extensive safety and compliance testing to the following standards:
|
||||
|
||||
### Safety
|
||||
|
||||
IEC 60950-1:2005 (Second Edition) + Am 1:2009 + Am 2:2013
|
||||
|
||||
### EMC
|
||||
|
||||
EN 55032: 2012
|
||||
|
||||
EN 55024: 2010
|
||||
|
||||
EN 55022:2010
|
||||
|
||||
EN 301 489-1 V1.9.2 (2011-09)
|
||||
|
||||
EN 301 489-17 V2.2.1 (2012-09)
|
||||
|
||||
### Radio Spectrum
|
||||
|
||||
ETSI EN 300 328 V1.9.1 (2015-02)
|
||||
|
||||
EN 62479:2010
|
||||
|
||||
### Chemical
|
||||
|
||||
Restriction of Hazardous Substances (RoHS) 2011/65/EU Annex II article 4(1)
|
||||
|
||||
EN71-3:2013 + A1:2014 - Migration of certain elements.
|
||||
|
||||
Analysis of the 163 substances of very high concern (SVHC) on the Candidate List for authorization, concerning Regulation (EC) No. 1907/2006 as published on the European Chemicals Agency (ECHA) website.
|
||||
|
||||

|
||||
|
||||
The micro:bit device features Bluetooth Low Energy radio. The radio on the device operates in the following frequencies:
|
||||
|
||||
Frequency Range: 2402MHz to 2480MHz
|
||||
|
||||
Bluetooth Version: V4.0 Bluetooth Low Energy
|
||||
|
||||
### Declaration of Conformity
|
||||
|
||||
The document can be downloaded by clicking here for the [Declaration of Conformity](https://microbit0.blob.core.windows.net/pub/hkeghjes/declaration-of-conformity.pdf)
|
||||
|
||||
The micro:bit has been designed to be a bare-board micro controller for use by children aged 11-12.
|
||||
More information is available at the [BBC web site](http://www.microbit.co.uk/device).
|
||||
|
@ -4,18 +4,18 @@ The micro:bit device #docs
|
||||
|
||||
The micro:bit is a very capable device with many components:
|
||||
|
||||
* [the USB connector](/microbit/device/usb)
|
||||
* [the LED screen](/microbit/device/screen)
|
||||
* [the USB connector](/device/usb)
|
||||
* [the LED screen](/device/screen)
|
||||
* [the buttons]
|
||||
* [the accelerometer]
|
||||
* [the compass]
|
||||
* [the pins](/microbit/device/pins)
|
||||
* [the pins](/device/pins)
|
||||
* [the battery plug]
|
||||
|
||||
The micro:bit embodies many fundamental concepts in computer science. To learn more, read:
|
||||
|
||||
* [the micro:bit - a reactive system](/microbit/device/reactive)
|
||||
* [the micro:bit - a reactive system](/device/reactive)
|
||||
|
||||
Sometimes, your micro:bit may display an error code. For more information, see:
|
||||
|
||||
* [the error codes](/microbit/device/error-codes)
|
||||
* [the error codes](/device/error-codes)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
The on pin pressed accessories.
|
||||
|
||||
Register an [event handler](/microbit/reference/event-handler) that will execute whenever the user attaches one side of the crocodile clip to the `GND` pin, then connects and disconnects the unattached side of the crocodile clip to pin `0`, `1`, or `2`.
|
||||
Register an [event handler](/reference/event-handler) that will execute whenever the user attaches one side of the crocodile clip to the `GND` pin, then connects and disconnects the unattached side of the crocodile clip to pin `0`, `1`, or `2`.
|
||||
|
||||
### Example: on pin pressed with random numbers
|
||||
|
||||
@ -18,9 +18,9 @@ This example displays a random number every time the crocodile clip holds `GND`
|
||||
|
||||
### Lessons
|
||||
|
||||
[love meter](/microbit/lessons/love-meter)
|
||||
[love meter](/lessons/love-meter)
|
||||
|
||||
### See also
|
||||
|
||||
[micro:bit pins](/microbit/device/pins), [pin is pressed](/microbit/reference/input/pin-is-pressed), [analog read pin](/microbit/reference/pins/analog-read-pin), [analog write pin](/microbit/reference/pins/analog-write-pin), [digital read pin](/microbit/reference/pins/digital-read-pin), [digital write pin](/microbit/reference/pins/digital-write-pin)
|
||||
[micro:bit pins](/device/pins), [pin is pressed](/reference/input/pin-is-pressed), [analog read pin](/reference/pins/analog-read-pin), [analog write pin](/reference/pins/analog-write-pin), [digital read pin](/reference/pins/digital-read-pin), [digital write pin](/reference/pins/digital-write-pin)
|
||||
|
||||
|
@ -13,5 +13,5 @@ Below is a list of error numbers and what they mean:
|
||||
|
||||
### See also
|
||||
|
||||
[Run scripts on your micro:bit](/microbit/device/usb)
|
||||
[Run scripts on your micro:bit](/device/usb)
|
||||
|
||||
|
@ -18,7 +18,7 @@ The micro:bit is a *reactive system* – it reacts continuously to external even
|
||||
|
||||
We want reactive systems to be responsive, which means to react in a timely manner to events. For example, when you play a computer game, it’s frustrating if you press a button to make a character jump, but it doesn’t immediately jump. A delay in reacting, or lack of responsiveness , can be the difference between life and death, both in the real and virtual worlds.
|
||||
|
||||
Let’s consider a simple example: you want to program your micro:bit to accurately count the number of times the A button has been pressed and continuously display the current count on the 5x5 [LED screen](/microbit/device/screen). Because the LED screen is small, we can only display one digit of a number at a time on it. The [show number](/microbit/reference/basic/show-number) function will scroll the digits of a number across the screen so you can read it.
|
||||
Let’s consider a simple example: you want to program your micro:bit to accurately count the number of times the A button has been pressed and continuously display the current count on the 5x5 [LED screen](/device/screen). Because the LED screen is small, we can only display one digit of a number at a time on it. The [show number](/reference/basic/show-number) function will scroll the digits of a number across the screen so you can read it.
|
||||
|
||||
Let’s say that the current count is 42 and the number 42 is scrolling across the LED screen. This means there is some code executing to perform the scroll. So, what should happen if you press the A button during the scroll? It would be a bad idea to ignore the button press, so some code should record the occurrence of the button press. But we just said there already is code running in order to scroll the number 42! If we wait until the code scrolling the 42 has finished to look for a button press, we will miss the button press. We want to avoid this sort of unresponsiveness.
|
||||
|
||||
|
@ -30,15 +30,15 @@ Since the row and column numbers start at 0, an easy way to figure out the x, y
|
||||
|
||||
### Turn a LED on/off
|
||||
|
||||
Use [plot](/microbit/led/plot) and [unplot](/microbit/led/unplot) to turn a LED on or off
|
||||
Use [plot](/led/plot) and [unplot](/led/unplot) to turn a LED on or off
|
||||
|
||||
### Is a LED on/off?
|
||||
|
||||
Use the [point](/microbit/led/point) function to find out if a LED is on or off.
|
||||
Use the [point](/led/point) function to find out if a LED is on or off.
|
||||
|
||||
### Display images, strings and numbers
|
||||
|
||||
Instead of turning individual LEDs on or off, as above, you can display an [image](/microbit/reference/image/image) directly to the screen or show text/numbers on screen using the [show number](/microbit/reference/basic/show-number)/[show string](/microbit/reference/basic/show-string) function.
|
||||
Instead of turning individual LEDs on or off, as above, you can display an [image](/reference/image/image) directly to the screen or show text/numbers on screen using the [show number](/reference/basic/show-number)/[show string](/reference/basic/show-string) function.
|
||||
|
||||
### The display buffer
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
How to compile, transfer, and run a script on your micro:bit.
|
||||
|
||||
While you're writing and testing your Block Editor or Touch Develop scripts, you'll mostly be running scripts in your browser by clicking the `Run` button (see [run code in your browser](/microbit/js/simulator) for info about this).
|
||||
While you're writing and testing your Block Editor or Touch Develop scripts, you'll mostly be running scripts in your browser by clicking the `Run` button (see [run code in your browser](/js/simulator) for info about this).
|
||||
|
||||
Once your masterpiece is complete, you can compile your script and run it on your micro:bit.
|
||||
|
||||
@ -33,7 +33,7 @@ WARN: unknown picture: bvabdbco:5x3
|
||||
|
||||
### ~hide
|
||||
|
||||
If your computer doesn't recognise your micro:bit, please see [troubleshooting USB problems](/microbit/diagnosing-usb).
|
||||
If your computer doesn't recognise your micro:bit, please see [troubleshooting USB problems](/diagnosing-usb).
|
||||
|
||||
### ~
|
||||
|
||||
@ -133,5 +133,5 @@ Or it may appear that there are two hex files on your micro:bit so the micro:bit
|
||||
|
||||
### See also
|
||||
|
||||
[Run code in a browser](/microbit/js/simulator)
|
||||
[Run code in a browser](/js/simulator)
|
||||
|
||||
|
@ -2,6 +2,6 @@
|
||||
|
||||
Welcome to the documentation.
|
||||
|
||||
* Browse the [reference](/microbit/reference)
|
||||
* Learn more about the [device](/microbit/device)
|
||||
* Get started with [lessons](/microbit/lessons)
|
||||
* Browse the [reference](/reference)
|
||||
* Learn more about the [device](/device)
|
||||
* Get started with [lessons](/lessons)
|
||||
|
@ -7,19 +7,19 @@
|
||||
|
||||
## Beginner
|
||||
|
||||
* [Beautiful Image](/microbit/lessons/beautiful-image), show a beautiful image with show LEDs
|
||||
* [Lucky 7](/microbit/lessons/lucky-7), show a number on the LED screen with show number
|
||||
* [Answering Machine](/microbit/lessons/answering-machine), show a text message with show string
|
||||
* [Game of Chance](/microbit/lessons/game-of-chance), show a text message with game over
|
||||
* [Smiley,](/microbit/lessons/smiley) smiley and frowney faces that transition on button pressed
|
||||
* [Magic Logo,](/microbit/lessons/magic-logo) show an image on logo up
|
||||
* [Snowflake Fall](/microbit/lessons/snowflake-fall), repeat a series of images with forever
|
||||
* [Screen Wipe](/microbit/lessons/screen-wipe), turn off the LEDs with clear screen
|
||||
* [Flashing Heart](/microbit/lessons/flashing-heart), display images with a pause
|
||||
* [Blink](/microbit/lessons/blink), turn an LED on and off with plot
|
||||
* [Night Light](/microbit/lessons/night-light), dim the LEDs with set brightness
|
||||
* [Game Counter](/microbit/lessons/game-counter), displays the player's score with score and add points to score
|
||||
* [Happy Birthday](/microbit/lessons/happy-birthday), create a popular song
|
||||
* [Beautiful Image](/lessons/beautiful-image), show a beautiful image with show LEDs
|
||||
* [Lucky 7](/lessons/lucky-7), show a number on the LED screen with show number
|
||||
* [Answering Machine](/lessons/answering-machine), show a text message with show string
|
||||
* [Game of Chance](/lessons/game-of-chance), show a text message with game over
|
||||
* [Smiley,](/lessons/smiley) smiley and frowney faces that transition on button pressed
|
||||
* [Magic Logo,](/lessons/magic-logo) show an image on logo up
|
||||
* [Snowflake Fall](/lessons/snowflake-fall), repeat a series of images with forever
|
||||
* [Screen Wipe](/lessons/screen-wipe), turn off the LEDs with clear screen
|
||||
* [Flashing Heart](/lessons/flashing-heart), display images with a pause
|
||||
* [Blink](/lessons/blink), turn an LED on and off with plot
|
||||
* [Night Light](/lessons/night-light), dim the LEDs with set brightness
|
||||
* [Game Counter](/lessons/game-counter), displays the player's score with score and add points to score
|
||||
* [Happy Birthday](/lessons/happy-birthday), create a popular song
|
||||
|
||||
### ~
|
||||
|
||||
@ -27,46 +27,46 @@
|
||||
|
||||
## Intermediate
|
||||
|
||||
* [Magic 8](/microbit/lessons/magic-8), a fortune teller game with the BBC micro:bit
|
||||
* [Guess the Number](/microbit/lessons/guess-the-number), guess a random number with pick number
|
||||
* [Counter](/microbit/lessons/counter), display a number with a variable
|
||||
* [Love Meter](/microbit/lessons/love-meter), create a love meter with on pin pressed
|
||||
* [Rock Paper Scissors](/microbit/lessons/rock-paper-scissors), create the classic game of rock paper scissors with if statement
|
||||
* [Truth or Dare](/microbit/lessons/truth-or-dare), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Spinner](/microbit/lessons/spinner), spin the arrow with multiple if statements
|
||||
* [Die Roll](/microbit/lessons/die-roll), spin with more if statements
|
||||
* [Looper](/microbit/lessons/looper), display a series of numbers with a for loop index
|
||||
* [Strobe Light](/microbit/lessons/strobe-light), develop shapes with a nested for loops
|
||||
* [Temperature](/microbit/lessons/temperature), get the ambient temperature (degree Celsius °C)
|
||||
* [Digi Yoyo](/microbit/lessons/digi-yoyo), create a counter with a while loop
|
||||
* [Rotation Animation](/microbit/lessons/rotation-animation), control an animation with a boolean variable
|
||||
* [Compass](/microbit/lessons/compass), displays the direction the BBC micro:bit is pointing with compass
|
||||
* [Zoomer](/microbit/lessons/zoomer), measure the force with acceleration
|
||||
* [Glowing Pendulum](/microbit/lessons/glowing-pendulum), construct a pendulum that glows using acceleration
|
||||
* [Classic Beatbox](/microbit/lessons/classic-beatbox), make a beatbox music player with variables
|
||||
* [Light Beatbox](/microbit/lessons/light-beatbox), make a beatbox music player with light level
|
||||
* [Magic 8](/lessons/magic-8), a fortune teller game with the BBC micro:bit
|
||||
* [Guess the Number](/lessons/guess-the-number), guess a random number with pick number
|
||||
* [Counter](/lessons/counter), display a number with a variable
|
||||
* [Love Meter](/lessons/love-meter), create a love meter with on pin pressed
|
||||
* [Rock Paper Scissors](/lessons/rock-paper-scissors), create the classic game of rock paper scissors with if statement
|
||||
* [Truth or Dare](/lessons/truth-or-dare), a game that forces each player to reveal a secret or do something funny with if statement
|
||||
* [Spinner](/lessons/spinner), spin the arrow with multiple if statements
|
||||
* [Die Roll](/lessons/die-roll), spin with more if statements
|
||||
* [Looper](/lessons/looper), display a series of numbers with a for loop index
|
||||
* [Strobe Light](/lessons/strobe-light), develop shapes with a nested for loops
|
||||
* [Temperature](/lessons/temperature), get the ambient temperature (degree Celsius °C)
|
||||
* [Digi Yoyo](/lessons/digi-yoyo), create a counter with a while loop
|
||||
* [Rotation Animation](/lessons/rotation-animation), control an animation with a boolean variable
|
||||
* [Compass](/lessons/compass), displays the direction the BBC micro:bit is pointing with compass
|
||||
* [Zoomer](/lessons/zoomer), measure the force with acceleration
|
||||
* [Glowing Pendulum](/lessons/glowing-pendulum), construct a pendulum that glows using acceleration
|
||||
* [Classic Beatbox](/lessons/classic-beatbox), make a beatbox music player with variables
|
||||
* [Light Beatbox](/lessons/light-beatbox), make a beatbox music player with light level
|
||||
|
||||
### ~
|
||||
|
||||
### ~column
|
||||
|
||||
## Maker
|
||||
* [The Watch](/microbit/lessons/the-watch), design and create The Watch
|
||||
* [Hack your Headphones](/microbit/lessons/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones
|
||||
* [Banana Keyboard](/microbit/lessons/banana-keyboard), create music with fruits
|
||||
* [Telegraph](/microbit/lessons/telegraph), play the telegraph game between two BBC micro:bits
|
||||
* [Pogo](/microbit/lessons/pogo), create a pogo game to test your jumping abilities
|
||||
* [The Watch](/lessons/the-watch), design and create The Watch
|
||||
* [Hack your Headphones](/lessons/hack-your-headphones), create music on the BBC micro:bit by hacking your headphones
|
||||
* [Banana Keyboard](/lessons/banana-keyboard), create music with fruits
|
||||
* [Telegraph](/lessons/telegraph), play the telegraph game between two BBC micro:bits
|
||||
* [Pogo](/lessons/pogo), create a pogo game to test your jumping abilities
|
||||
|
||||
## Advanced
|
||||
* [Charting](/microbit/lessons/charting), create a charting app between 2 BBC micro:bits
|
||||
* [Prank WiFi](/microbit/lessons/prank-wifi), create fake WiFi to trick your friends
|
||||
* [Speed Button](/microbit/lessons/speed-button), code a speed game with running time
|
||||
* [Headbands](/microbit/lessons/headbands), create a charades game with a collection of strings that hold the words
|
||||
* [Hero](/microbit/lessons/hero), reconstruct the classic arcade game pac man with the BBC micro:bit
|
||||
* [Catch the Egg](/microbit/lessons/catch-the-egg-game), catch falling eggs in a basket with an acceleration controller
|
||||
* [Charting](/lessons/charting), create a charting app between 2 BBC micro:bits
|
||||
* [Prank WiFi](/lessons/prank-wifi), create fake WiFi to trick your friends
|
||||
* [Speed Button](/lessons/speed-button), code a speed game with running time
|
||||
* [Headbands](/lessons/headbands), create a charades game with a collection of strings that hold the words
|
||||
* [Hero](/lessons/hero), reconstruct the classic arcade game pac man with the BBC micro:bit
|
||||
* [Catch the Egg](/lessons/catch-the-egg-game), catch falling eggs in a basket with an acceleration controller
|
||||
### ~
|
||||
|
||||
### @section full
|
||||
|
||||
The lessons promote computational thinking and computer science literacy[ read more...](/microbit/lessons/teach)
|
||||
The lessons promote computational thinking and computer science literacy[ read more...](/lessons/teach)
|
||||
|
||||
|
@ -10,10 +10,10 @@ Show String
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/answering-machine/activity)
|
||||
* [quiz](/microbit/lessons/answering-machine/quiz)
|
||||
* [quiz answers](/microbit/lessons/answering-machine/quiz-answers)
|
||||
* [challenges](/microbit/lessons/answering-machine/challenges)
|
||||
* [activity](/lessons/answering-machine/activity)
|
||||
* [quiz](/lessons/answering-machine/quiz)
|
||||
* [quiz answers](/lessons/answering-machine/quiz-answers)
|
||||
* [challenges](/lessons/answering-machine/challenges)
|
||||
|
||||
|
||||
## Prior learning / place of lesson in scheme of work
|
||||
@ -29,7 +29,7 @@ input.onButtonPressed(Button.A, () => {})
|
||||
```
|
||||
|
||||
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
|
||||
## Objectives
|
||||
|
||||
|
@ -18,7 +18,7 @@ basic.showString("ASK ME A QUESTION")
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/answering-machine/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/answering-machine/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the answering machine tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [answering machine](/microbit/lessons/answering-machine/activity) activity and your code will look like this:
|
||||
Complete the [answering machine](/lessons/answering-machine/activity) activity and your code will look like this:
|
||||
|
||||
```blocks
|
||||
basic.showString("ASK ME A QUESTION")
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Create an answering machine on the micro:bit.
|
||||
|
||||
This is the answer key for the [answering machine quiz](/microbit/lessons/answering-machine/quiz).
|
||||
This is the answer key for the [answering machine quiz](/lessons/answering-machine/quiz).
|
||||
|
||||
## 1. Define what `show string` does?
|
||||
|
||||
|
@ -6,7 +6,7 @@ Create an answering machine on the micro:bit.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [answering machine activity](/microbit/lessons/answering-machine/activity).
|
||||
Use this activity document to guide your work in the [answering machine activity](/lessons/answering-machine/activity).
|
||||
|
||||
Answer the questions while completing the activity. Pay attention to the dialogues!
|
||||
|
||||
|
@ -8,7 +8,7 @@ Music
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/banana-keyboard/activity)
|
||||
* [activity](/lessons/banana-keyboard/activity)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -79,11 +79,11 @@ Your banana keyboard is ready!
|
||||
|
||||
### Step 10
|
||||
|
||||
Connect your micro:bit to your computer using your USB cable and run the [banana keyboard](/microbit/lhpkbr) script on it. Tap your banana instrument to play sound against... the fruit!
|
||||
Connect your micro:bit to your computer using your USB cable and run the [banana keyboard](/lhpkbr) script on it. Tap your banana instrument to play sound against... the fruit!
|
||||
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/banana-keyboard/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/banana-keyboard/challenges)!
|
||||
|
||||
### ~
|
||||
|
@ -6,8 +6,6 @@ control images with variables.
|
||||
|
||||
Control images with variables.
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under *Block Editor*.
|
||||
|
||||
Have you ever tried to making beat box sounds? Let's try making a beatbox with code!
|
||||
|
||||
We will register an event handler on the fruit that will execute when two things occur: first, the alligator clip attaches to GND and the other side of the alligator clip is inserted into a banana. Let's start by adding a variable where you can store data. Then rename the variable to "sound". Then set the value of the variable to the note block `A` from the Music drawer. Modify your code so that your code looks like this.
|
||||
|
@ -8,8 +8,8 @@ Music
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/beatbox/activity)
|
||||
* [challenges](/microbit/lessons/beatbox/challenges)
|
||||
* [activity](/lessons/beatbox/activity)
|
||||
* [challenges](/lessons/beatbox/challenges)
|
||||
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
@ -10,8 +10,8 @@ Show LEDs
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/beautiful-image/activity)
|
||||
* [challenges](/microbit/lessons/beautiful-image/challenges)
|
||||
* [activity](/lessons/beautiful-image/activity)
|
||||
* [challenges](/lessons/beautiful-image/challenges)
|
||||
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
@ -10,8 +10,6 @@ Let's learn how to show an image on the LED screen.
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under the *Block Editor*.
|
||||
|
||||
We will use *show LEDs* to draw an image on the LED screen. This function immediately writes on the screen.
|
||||
|
||||
```blocks
|
||||
@ -26,7 +24,7 @@ basic.showLeds(`
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/beautiful-image/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/beautiful-image/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the beautiful image tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [beautiful image](/microbit/lessons/beautiful-image/activity) activity and your code will look like this:
|
||||
Complete the [beautiful image](/lessons/beautiful-image/activity) activity and your code will look like this:
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
|
@ -10,10 +10,10 @@ Plot
|
||||
|
||||
## Quick links
|
||||
|
||||
* [activity](/microbit/lessons/blink/activity)
|
||||
* [quiz](/microbit/lessons/blink/quiz)
|
||||
* [quiz answers](/microbit/lessons/blink/quiz-answers)
|
||||
* [challenges](/microbit/lessons/blink/challenges)
|
||||
* [activity](/lessons/blink/activity)
|
||||
* [quiz](/lessons/blink/quiz)
|
||||
* [quiz answers](/lessons/blink/quiz-answers)
|
||||
* [challenges](/lessons/blink/challenges)
|
||||
|
||||
|
||||
## Prior learning / place of lesson in scheme of work
|
||||
|
@ -6,8 +6,6 @@ Turn an LED on and off with forever
|
||||
|
||||
### @video td/videos/blink-0
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under *Block Editor*.
|
||||
|
||||
### ~
|
||||
|
||||
Have you ever tried to blink a flashlight at night? The concept is fairly simply: turn on the light, wait for a little, turn off the light, wait again, and repeat. That's exactly what we need to code to get a blinking LED.
|
||||
@ -50,7 +48,7 @@ basic.forever(() => {
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/blink/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/blink/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the blink tutorial
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [blink](/microbit/lessons/blink/activity) activity and your code will look like this:
|
||||
Complete the [blink](/lessons/blink/activity) activity and your code will look like this:
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Learn how to create a blinking LED script.
|
||||
|
||||
This is the answer key for the [blink quiz](/microbit/lessons/blink/quiz).
|
||||
This is the answer key for the [blink quiz](/lessons/blink/quiz).
|
||||
|
||||
## 1. Describe what `plot` does?
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to create a blinking LED script.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [blink activity](/microbit/lessons/blink/activity).
|
||||
Use this activity document to guide your work in the [blink activity](/lessons/blink/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ a game where you have to keep up with the commands.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [bop it tutorial](/microbit/lessons/bop-it/tutorial).
|
||||
Use this activity document to guide your work in the [bop it tutorial](/lessons/bop-it/tutorial).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,35 +6,33 @@ a game where you have to keep up with the commands.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [bop it tutorial](/microbit/lessons/bop-it/tutorial).
|
||||
Use this activity document to guide your work in the [bop it tutorial](/lessons/bop-it/tutorial).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
## 1. Write the code that will store the global variable named 'action' and returns a random number between 0 and 2
|
||||
### 1. Write the code that will store the global variable named 'action' and returns a random number between 0 and 2
|
||||
|
||||
<br/>
|
||||
|
||||
## 2. Write the code that will display the string, "PUSH A" if the global variable called 'action' is equal to 0
|
||||
### 2. Write the code that will display the string, "PUSH A" if the global variable called 'action' is equal to 0
|
||||
|
||||
<br />
|
||||
|
||||
## 3. Write the code that increments the score if button A is pressed when the global variable called 'action' is equal to 1
|
||||
### 3. Write the code that increments the score if button A is pressed when the global variable called 'action' is equal to 1
|
||||
|
||||
<br />
|
||||
|
||||
## 4. Write the code that will display the string "LOGO DOWN" if the global variable called 'action' is equal to 1
|
||||
### 4. Write the code that will display the string "LOGO DOWN" if the global variable called 'action' is equal to 1
|
||||
|
||||
<br />
|
||||
|
||||
## 5. Write the code that increments the score if the BBC micro:bit logo is tilted down when the global variable called 'action' is equal to 1
|
||||
### 5. Write the code that increments the score if the BBC micro:bit logo is tilted down when the global variable called 'action' is equal to 1
|
||||
|
||||
<br />
|
||||
|
||||
<br />
|
||||
|
||||
## 6. Write the code that will display the string "SHAKE" if the global variable called 'action' is equal to 2
|
||||
### 6. Write the code that will display the string "SHAKE" if the global variable called 'action' is equal to 2
|
||||
|
||||
<br />
|
||||
|
||||
## 7. Write the code that increments the score if the BBC micro:bit is shaken when the global variable called 'action' is equal to 2
|
||||
### 7. Write the code that increments the score if the BBC micro:bit is shaken when the global variable called 'action' is equal to 2
|
||||
|
||||
|
@ -8,8 +8,8 @@ Ring
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/buzzer/activity)
|
||||
* [challenges](/microbit/lessons/buzzer/challenges)
|
||||
* [activity](/lessons/buzzer/activity)
|
||||
* [challenges](/lessons/buzzer/challenges)
|
||||
|
||||
## Class
|
||||
|
||||
@ -21,9 +21,9 @@ Learn how to **ring** the buzzer to turn on the sound. We will be learning basic
|
||||
|
||||
## Documentation
|
||||
|
||||
* **ring** : [read more...](/microbit/reference/music/ring)
|
||||
* **clear screen** : [read more...](/microbit/reference/basic/clear-screen)
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **ring** : [read more...](/reference/music/ring)
|
||||
* **clear screen** : [read more...](/reference/basic/clear-screen)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -68,14 +68,14 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [activity](/microbit/lessons/buzzer/activity)
|
||||
* [activity](/lessons/buzzer/activity)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/buzzer/challenges)
|
||||
* [challenges](/lessons/buzzer/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/buzzer/challenges)
|
||||
* Extended Activity: [challenges](/lessons/buzzer/challenges)
|
||||
|
||||
|
@ -10,9 +10,9 @@ Variables
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/catch-the-egg-game/activity)
|
||||
* [quiz](/microbit/lessons/catch-the-egg-game/quiz)
|
||||
* [quiz answers](/microbit/lessons/catch-the-egg-game/quiz-answers)
|
||||
* [activity](/lessons/catch-the-egg-game/activity)
|
||||
* [quiz](/lessons/catch-the-egg-game/quiz)
|
||||
* [quiz answers](/lessons/catch-the-egg-game/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
@ -20,18 +20,18 @@ Learn how to create a catch the egg game game with **plot**, `led->plot` , **unp
|
||||
|
||||
## Documentation
|
||||
|
||||
* **variables** : [read more...](/microbit/reference/variables/var)
|
||||
* **forever** : [read more...](/microbit/reference/basic/forever)
|
||||
* **unplot** : [read more...](/microbit/reference/led/unplot)
|
||||
* **plot** : [read more...](/microbit/reference/led/plot)
|
||||
* **if** : [read more...](/microbit/reference/logic/if)
|
||||
* **acceleration** : [read more...](/microbit/reference/input/acceleration)
|
||||
* **math minimum number** : [read more...](/microbit/js/math)
|
||||
* **math maximum number** : [read more...](/microbit/js/math)
|
||||
* **math random number** : [read more...](/microbit/js/math)
|
||||
* **math modulus** : [read more...](/microbit/js/math)
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **pause** : [read more...](/microbit/reference/basic/pause)
|
||||
* **variables** : [read more...](/reference/variables/var)
|
||||
* **forever** : [read more...](/reference/basic/forever)
|
||||
* **unplot** : [read more...](/reference/led/unplot)
|
||||
* **plot** : [read more...](/reference/led/plot)
|
||||
* **if** : [read more...](/reference/logic/if)
|
||||
* **acceleration** : [read more...](/reference/input/acceleration)
|
||||
* **math minimum number** : [read more...](/js/math)
|
||||
* **math maximum number** : [read more...](/js/math)
|
||||
* **math random number** : [read more...](/js/math)
|
||||
* **math modulus** : [read more...](/js/math)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
* **pause** : [read more...](/reference/basic/pause)
|
||||
|
||||
## Objectives
|
||||
|
||||
|
@ -6,7 +6,7 @@ Programming a game of catch the egg using the accelerometer
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [catch the egg tutorial](/microbit/lessons/catch-the-egg-game/tutorial)
|
||||
Use this activity document to guide your work in the [catch the egg tutorial](/lessons/catch-the-egg-game/tutorial)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ Programming a game of catch the egg using the accelerometer.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [catch the egg challenges](/microbit/lessons/catch-the-egg-game/activity)
|
||||
Use this activity document to guide your work in the [catch the egg challenges](/lessons/catch-the-egg-game/activity)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -22,7 +22,7 @@ Create a timer that runs out after a certain amount of time (using the *count* l
|
||||
|
||||
## Graphics Challenges [3]
|
||||
|
||||
Using the knowledge you have learnt from the [rendering graphics](/microbit/lessons/graphics) section, try creating an algorithm to draw these shapes. Before you write the code try to figure out how the BBC micro:bit will be thinking to plot these points. For example, with our diagonal line – “count up from 0 to 4 by 1, and plot points x=i and y=i”.
|
||||
Using the knowledge you have learnt from the [rendering graphics](/lessons/graphics) section, try creating an algorithm to draw these shapes. Before you write the code try to figure out how the BBC micro:bit will be thinking to plot these points. For example, with our diagonal line – “count up from 0 to 4 by 1, and plot points x=i and y=i”.
|
||||
|
||||
* Another diagonal line
|
||||
* A square going around the board
|
||||
|
@ -8,7 +8,7 @@ Acceleration
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/charting/activity)
|
||||
* [activity](/lessons/charting/activity)
|
||||
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
@ -4,8 +4,6 @@ Measure the acceleration on the micro:bit in the "z" direction.
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap `New Project` under `Block Editor`.
|
||||
|
||||
### ~
|
||||
|
||||
Welcome! This activity will teach how to use the 1st micro:bit to chart the second micro:bit's acceleration in the "x" direction. Let's get started!
|
||||
|
@ -8,8 +8,8 @@ Music
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/classic-beatbox/activity)
|
||||
* [challenges](/microbit/lessons/classic-beatbox/challenges)
|
||||
* [activity](/lessons/classic-beatbox/activity)
|
||||
* [challenges](/lessons/classic-beatbox/challenges)
|
||||
|
||||
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
Control images with variables.
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under *Block Editor*.
|
||||
|
||||
Have you ever tried to making beat box sounds? Let's try making a beatbox with code!
|
||||
|
||||
Let's start by adding a variable where you can store data. Then rename the variable to "sound". Then set the value of the variable to the note block `A` from the Music drawer. Modify your code so that your code looks like this.
|
||||
@ -51,6 +49,6 @@ input.onPinPressed(TouchPin.P1, () => {
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/classic-beatbox/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/classic-beatbox/challenges)!
|
||||
|
||||
### ~
|
@ -4,7 +4,7 @@ Create sounds with variables.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [beatbox](/microbit/lessons/beatbox/activity) activity and your code will look like this:
|
||||
Complete the [beatbox](/lessons/beatbox/activity) activity and your code will look like this:
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -10,10 +10,10 @@ If (Conditionals)
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/compass/activity)
|
||||
* [challenges](/microbit/lessons/compass/challenges)
|
||||
* [quiz](/microbit/lessons/compass/quiz)
|
||||
* [quiz answers](/microbit/lessons/compass/quiz-answers)
|
||||
* [activity](/lessons/compass/activity)
|
||||
* [challenges](/lessons/compass/challenges)
|
||||
* [quiz](/lessons/compass/quiz)
|
||||
* [quiz answers](/lessons/compass/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -28,9 +28,8 @@ basic.forever(() => {
|
||||
If `degrees` is less than `45`, then the compass heading is mostly pointing toward North. Display `N` on the micro:bit.
|
||||
|
||||
```blocks
|
||||
let degrees = 0;
|
||||
basic.forever(() => {
|
||||
degrees = input.compassHeading();
|
||||
let degrees = input.compassHeading();
|
||||
if (degrees < 45) {
|
||||
basic.showString("N");
|
||||
}
|
||||
@ -41,9 +40,8 @@ If `degrees` is less than 135, the micro:bit is mostly pointing East. Display `E
|
||||
|
||||
|
||||
```blocks
|
||||
let degrees = 0;
|
||||
basic.forever(() => {
|
||||
degrees = input.compassHeading();
|
||||
let degrees = input.compassHeading();
|
||||
if (degrees < 45) {
|
||||
basic.showString("N");
|
||||
}
|
||||
@ -57,9 +55,8 @@ If `degrees` is less than 225, the micro:bit is mostly pointing South. Display `
|
||||
|
||||
|
||||
```blocks
|
||||
let degrees = 0;
|
||||
basic.forever(() => {
|
||||
degrees = input.compassHeading();
|
||||
let degrees = input.compassHeading();
|
||||
if (degrees < 45) {
|
||||
basic.showString("N");
|
||||
}
|
||||
@ -76,9 +73,8 @@ basic.forever(() => {
|
||||
If none of these conditions returned true, then the micro:bit must be pointing West. Display `W` on the micro:bit.
|
||||
|
||||
```blocks
|
||||
let degrees = 0;
|
||||
basic.forever(() => {
|
||||
degrees = input.compassHeading();
|
||||
let degrees = input.compassHeading();
|
||||
if (degrees < 45) {
|
||||
basic.showString("N");
|
||||
}
|
||||
@ -96,7 +92,7 @@ basic.forever(() => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/compass/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/compass/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Display the direction that the micro:bit is facing using the compass
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [guided tutorial](/microbit/lessons/compass/activity), your code should look like this:
|
||||
Complete the following [guided tutorial](/lessons/compass/activity), your code should look like this:
|
||||
|
||||
```blocks
|
||||
let degrees = 0;
|
||||
|
@ -6,7 +6,7 @@ Create an actual compass to show your direction: North, South, East, or West
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [compass tutorial](/microbit/lessons/compass/activity).
|
||||
Use this activity document to guide your work in the [compass tutorial](/lessons/compass/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ Create an actual compass to show your direction: North, South, East, or West
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [compass activity](/microbit/lessons/compass/activity).
|
||||
Use this activity document to guide your work in the [compass activity](/lessons/compass/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,10 +10,10 @@ Variables
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/counter/activity)
|
||||
* [challenges](/microbit/lessons/counter/challenges)
|
||||
* [quiz](/microbit/lessons/counter/quiz)
|
||||
* [quiz answers](/microbit/lessons/counter/quiz-answers)
|
||||
* [activity](/lessons/counter/activity)
|
||||
* [challenges](/lessons/counter/challenges)
|
||||
* [quiz](/lessons/counter/quiz)
|
||||
* [quiz answers](/lessons/counter/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
@ -36,10 +36,10 @@ basic.showLeds(`
|
||||
`)
|
||||
```
|
||||
|
||||
* **variable**: [read more...](/microbit/reference/variables/var)
|
||||
* **arithmetic operators**: [read more...](/microbit/reference/types/number)
|
||||
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
|
||||
* **show number** : [read more...](/microbit/reference/basic/show-number)
|
||||
* **variable**: [read more...](/reference/variables/var)
|
||||
* **arithmetic operators**: [read more...](/reference/types/number)
|
||||
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
|
||||
* **show number** : [read more...](/reference/basic/show-number)
|
||||
|
||||
## Objectives
|
||||
|
||||
|
@ -39,7 +39,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/counter/challenges)
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/counter/challenges)
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the counter.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [guided tutorial](/microbit/lessons/counter/activity) At the end of the tutorial, click **keep editing**. Your code should look like this:
|
||||
Complete the following [guided tutorial](/lessons/counter/activity) At the end of the tutorial, click **keep editing**. Your code should look like this:
|
||||
|
||||
```blocks
|
||||
let count = 0
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Learn how to create a counter with the BBC micro:bit button.
|
||||
|
||||
This is the answer key for the [counter quiz](/microbit/lessons/counter/quiz).
|
||||
This is the answer key for the [counter quiz](/lessons/counter/quiz).
|
||||
|
||||
## 1. What is a variable?
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to create a counter with the BBC micro:bit button.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [counter tutorial](/microbit/lessons/counter/activity).
|
||||
Use this activity document to guide your work in the [counter tutorial](/lessons/counter/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -37,5 +37,5 @@ Your circuit is complete!
|
||||
|
||||
### Step 10
|
||||
|
||||
Connect your micro:bit to your computer using your USB cable and run the [guess the number](/microbit/lhpkbr) script on it.
|
||||
Connect your micro:bit to your computer using your USB cable and run the [guess the number](/lhpkbr) script on it.
|
||||
|
||||
|
@ -10,10 +10,10 @@ If (Conditionals)
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/die-roll/activity)
|
||||
* [challenges](/microbit/lessons/die-roll/challenges)
|
||||
* [quiz](/microbit/lessons/die-roll/quiz)
|
||||
* [quiz answers](/microbit/lessons/die-roll/quiz-answers)
|
||||
* [activity](/lessons/die-roll/activity)
|
||||
* [challenges](/lessons/die-roll/challenges)
|
||||
* [quiz](/lessons/die-roll/quiz)
|
||||
* [quiz answers](/lessons/die-roll/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -165,7 +165,7 @@ input.onGesture(Gesture.Shake, () => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/die-roll/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/die-roll/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Create a die on the micro:bit.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [guided tutorial](/microbit/lessons/die-roll/activity), your code should look like this:
|
||||
Complete the following [guided tutorial](/lessons/die-roll/activity), your code should look like this:
|
||||
|
||||
```blocks
|
||||
input.onGesture(Gesture.Shake, () => {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Create a die when the BBC micro:bit is shaken
|
||||
|
||||
These are the answers to the [die roll quiz](/microbit/lessons/die-roll/quiz).
|
||||
These are the answers to the [die roll quiz](/lessons/die-roll/quiz).
|
||||
|
||||
## 1. Create a variable named 'roll' that will be randomly assigned to a number between 0 and 5.
|
||||
|
||||
|
@ -6,7 +6,7 @@ Create a die when the BBC micro:bit is shaken
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [die roll tutorial](/microbit/lessons/die-roll/activity).
|
||||
Use this activity document to guide your work in the [die roll tutorial](/lessons/die-roll/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,10 +10,10 @@ While Loop
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/digi-yoyo/activity)
|
||||
* [challenges](/microbit/lessons/digi-yoyo/challenges)
|
||||
* [quiz](/microbit/lessons/digi-yoyo/quiz)
|
||||
* [quiz answers](/microbit/lessons/digi-yoyo/quiz-answers)
|
||||
* [activity](/lessons/digi-yoyo/activity)
|
||||
* [challenges](/lessons/digi-yoyo/challenges)
|
||||
* [quiz](/lessons/digi-yoyo/quiz)
|
||||
* [quiz answers](/lessons/digi-yoyo/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -31,7 +31,7 @@ Let's add a pause. Then show the value of the the count.
|
||||
|
||||
|
||||
```blocks
|
||||
let count = 0;
|
||||
let count = 0;
|
||||
while (count < 10) {
|
||||
basic.pause(100);
|
||||
basic.showNumber(count)
|
||||
@ -54,7 +54,7 @@ while (count < 10) {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/digi-yoyo/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/digi-yoyo/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the digi yoyo.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [guided tutorial](/microbit/lessons/digi-yoyo/activity), your code should look like this:
|
||||
Complete the following [guided tutorial](/lessons/digi-yoyo/activity), your code should look like this:
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Answers for digi yoyo quiz.
|
||||
|
||||
This is the answer key for the [digi yoyo quiz](/microbit/lessons/digi-yoyo/quiz).
|
||||
This is the answer key for the [digi yoyo quiz](/lessons/digi-yoyo/quiz).
|
||||
|
||||
## 1. Describe what a "while loop" does?
|
||||
|
||||
|
@ -6,7 +6,7 @@ Create a counter with a while loop
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [digi yoyo tutorial](/microbit/lessons/digi-yoyo/activity)
|
||||
Use this activity document to guide your work in the [digi yoyo tutorial](/lessons/digi-yoyo/activity)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,10 +10,10 @@ Pause
|
||||
|
||||
## Quick links
|
||||
|
||||
* [activity](/microbit/lessons/flashing-heart/activity)
|
||||
* [quiz](/microbit/lessons/flashing-heart/quiz)
|
||||
* [quiz answers](/microbit/lessons/flashing-heart/quiz-answers)
|
||||
* [challenges](/microbit/lessons/flashing-heart/challenges)
|
||||
* [activity](/lessons/flashing-heart/activity)
|
||||
* [quiz](/lessons/flashing-heart/quiz)
|
||||
* [quiz answers](/lessons/flashing-heart/quiz-answers)
|
||||
* [challenges](/lessons/flashing-heart/challenges)
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
Learn how to `show LEDs` by showing an image on the LED screen. We will be learning how to create a blinking app using a forever loop as well as simple commands, such as show LEDs, pause, and clear screen.
|
||||
|
@ -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](/microbit/create-code) page and tap *New Project* under *Block Editor*.
|
||||
|
||||
Let's start by adding code that plots a heart image on the screen using `show LEDs`. Once you are done coding, don't forget to run your code in the simulator or the micro:bit.
|
||||
|
||||
|
||||
@ -69,7 +67,7 @@ basic.forever(() => {
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/flashing-heart/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/flashing-heart/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the flashing heart tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [flashing heart](/microbit/lessons/flashing-heart/activity) activity and your code will look like this:
|
||||
Complete the [flashing heart](/lessons/flashing-heart/activity) activity and your code will look like this:
|
||||
|
||||
```blocks
|
||||
basic.forever(() => {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Learn how to create an image with a variable.
|
||||
|
||||
This is the answer key for the [flashing heart quiz](/microbit/lessons/flashing-heart/quiz).
|
||||
This is the answer key for the [flashing heart quiz](/lessons/flashing-heart/quiz).
|
||||
|
||||
## 1. Describe what pause does
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to create a blinking image with a variable.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [flashing heart activity](/microbit/lessons/flashing-heart/activity).
|
||||
Use this activity document to guide your work in the [flashing heart activity](/lessons/flashing-heart/activity).
|
||||
|
||||
Answer the questions while completing the activity. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,8 +10,8 @@ Game Library
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/game-counter/activity)
|
||||
* [challenges](/microbit/lessons/game-counter/challenges)
|
||||
* [activity](/lessons/game-counter/activity)
|
||||
* [challenges](/lessons/game-counter/challenges)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -6,8 +6,6 @@ Turn an LED on and off with forever loop
|
||||
|
||||
### @video td/videos/counter-0
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under *Block Editor*.
|
||||
|
||||
### ~
|
||||
|
||||
Have you ever tried to create a game counter? The concept is fairly simply: increase the game `score` with `on button pressed` .
|
||||
@ -36,7 +34,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/game-counter/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/game-counter/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the game counter.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [activity](/microbit/lessons/game-counter/activity) . Your code should look like this:
|
||||
Complete the following [activity](/lessons/game-counter/activity) . Your code should look like this:
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
|
@ -8,8 +8,8 @@ Game Library
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/game-of-chance/activity)
|
||||
* [challenges](/microbit/lessons/game-of-chance/challenges)
|
||||
* [activity](/lessons/game-of-chance/activity)
|
||||
* [challenges](/lessons/game-of-chance/challenges)
|
||||
|
||||
## Prior learning / place of lesson in scheme of work
|
||||
|
||||
|
@ -10,7 +10,7 @@ basic.showString("SELECT A BUTTON")
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/game-of-chance/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/game-of-chance/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the answering machine tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [game of chance](/microbit/lessons/game-of-chance/activity) activity and your code will look like this:
|
||||
Complete the [game of chance](/lessons/game-of-chance/activity) activity and your code will look like this:
|
||||
|
||||
```blocks
|
||||
basic.showString("SELECT A BUTTON")
|
||||
|
@ -8,10 +8,10 @@ Acceleration
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/glowing-pendulum/activity)
|
||||
* [challenges](/microbit/lessons/glowing-pendulum/challenges)
|
||||
* [quiz](/microbit/lessons/glowing-pendulum/quiz)
|
||||
* [quiz answers](/microbit/lessons/glowing-pendulum/quiz-answers)
|
||||
* [activity](/lessons/glowing-pendulum/activity)
|
||||
* [challenges](/lessons/glowing-pendulum/challenges)
|
||||
* [quiz](/lessons/glowing-pendulum/quiz)
|
||||
* [quiz answers](/lessons/glowing-pendulum/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
Construct a pendulum that glows using acceleration.
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap `New Project` under `Block Editor`.
|
||||
|
||||
Welcome! This activity will teach how to construct a pendulum that glows using acceleration. Let's get started!
|
||||
|
||||
Create a **forever** loop that will constantly display the appropriate brightness on the LED display.
|
||||
@ -51,7 +49,7 @@ Let's show what the brightness of the micro:bit is by turning all the LEDs on!
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/glowing-pendulum/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/glowing-pendulum/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the glowing pendulum tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [glowing pendulum activity](/microbit/lessons/glowing-pendulum/activity) and your code should look like this:
|
||||
Complete the following [glowing pendulum activity](/lessons/glowing-pendulum/activity) and your code should look like this:
|
||||
|
||||

|
||||
|
||||
|
@ -6,7 +6,7 @@ construct a pendulum that glows using acceleration.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [glowing pendulum tutorial](/microbit/lessons/glowing-pendulum/tutorial)
|
||||
Use this activity document to guide your work in the [glowing pendulum tutorial](/lessons/glowing-pendulum/tutorial)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ construct a pendulum that glows using acceleration.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [glowing pendulum tutorial](/microbit/lessons/glowing-pendulum/activity)
|
||||
Use this activity document to guide your work in the [glowing pendulum tutorial](/lessons/glowing-pendulum/activity)
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -10,10 +10,10 @@ Fade Out
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/glowing-sword/activity)
|
||||
* [quiz](/microbit/lessons/glowing-sword/quiz)
|
||||
* [quiz answers](/microbit/lessons/glowing-sword/quiz-answers)
|
||||
* [challenges](/microbit/lessons/glowing-sword/challenges)
|
||||
* [activity](/lessons/glowing-sword/activity)
|
||||
* [quiz](/lessons/glowing-sword/quiz)
|
||||
* [quiz answers](/lessons/glowing-sword/quiz-answers)
|
||||
* [challenges](/lessons/glowing-sword/challenges)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
@ -21,10 +21,10 @@ Learn how to manipulate an image through **fade out**, `fade out` to gradually d
|
||||
|
||||
## Documentation
|
||||
|
||||
* **create image** : [read more...](/microbit/reference/images/create-image)
|
||||
* **show image** : [read more...](/microbit/reference/images/show-image)
|
||||
* **fade out** : [read more...](/microbit/reference/led/fade-out)
|
||||
* **pause** : [read more...](/microbit/reference/basic/pause)
|
||||
* **fade in** : [read more...](/microbit/reference/led/fade-in)
|
||||
* **create image** : [read more...](/reference/images/create-image)
|
||||
* **show image** : [read more...](/reference/images/show-image)
|
||||
* **fade out** : [read more...](/reference/led/fade-out)
|
||||
* **pause** : [read more...](/reference/basic/pause)
|
||||
* **fade in** : [read more...](/reference/led/fade-in)
|
||||
|
||||
|
||||
|
@ -44,7 +44,7 @@ Try devising an algorithm for a diagonal line using the code above and the varia
|
||||
|
||||

|
||||
|
||||
We can create more complex algorithms for more complex shapes, too. See the [challenges](/microbit/lessons/challenges) section for additional graphical challenges and solutions.
|
||||
We can create more complex algorithms for more complex shapes, too. See the [challenges](/lessons/challenges) section for additional graphical challenges and solutions.
|
||||
|
||||
### Animations
|
||||
|
||||
@ -52,7 +52,7 @@ Animations are changes happening at a certain rate. For example, we could add th
|
||||
|
||||
We could create more complex animations, for example we could make our BBC micro:bit display an explosion or fireworks.
|
||||
|
||||
See the [challenges](/microbit/lessons/challenges) section for some animation tasks.
|
||||
See the [challenges](/lessons/challenges) section for some animation tasks.
|
||||
|
||||
### Image variables
|
||||
|
||||
|
@ -10,10 +10,10 @@ Math - Pick Random
|
||||
|
||||
## Quick links
|
||||
|
||||
* [activity](/microbit/lessons/guess-the-number/activity)
|
||||
* [challenges](/microbit/lessons/guess-the-number/challenges)
|
||||
* [quiz](/microbit/lessons/guess-the-number/quiz)
|
||||
* [quiz answers](/microbit/lessons/guess-the-number/quiz-answers)
|
||||
* [activity](/lessons/guess-the-number/activity)
|
||||
* [challenges](/lessons/guess-the-number/challenges)
|
||||
* [quiz](/lessons/guess-the-number/quiz)
|
||||
* [quiz answers](/lessons/guess-the-number/quiz-answers)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -42,7 +42,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/guess-the-number/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/guess-the-number/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for the guess the number tutorial.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the following [guided tutorial](/microbit/lessons/guess-the-number/activity), and your code should look like this:
|
||||
Complete the following [guided tutorial](/lessons/guess-the-number/activity), and your code should look like this:
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Learn how to generate a random number on the micro:bit.
|
||||
|
||||
This is the answer key for the [guess the number quiz](/microbit/lessons/guess-the-number/quiz).
|
||||
This is the answer key for the [guess the number quiz](/lessons/guess-the-number/quiz).
|
||||
|
||||
## 1. What is on button pressed?
|
||||
|
||||
|
@ -6,7 +6,7 @@ Learn how to generate a random number on the micro:bit.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [guess the number tutorial](/microbit/lessons/guess-the-number/activity).
|
||||
Use this activity document to guide your work in the [guess the number tutorial](/lessons/guess-the-number/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -8,7 +8,7 @@ Hack your headphone
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/hack-your-headphones/activity)
|
||||
* [activity](/lessons/hack-your-headphones/activity)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -52,10 +52,10 @@ You hacked your headphones!
|
||||
|
||||
### Step 6
|
||||
|
||||
Connect your micro:bit to your computer using your USB cable and program [light beatbox](/microbit/lessons/light-beatbox/activity) music on it. Press the reset button to restart your music player!
|
||||
Connect your micro:bit to your computer using your USB cable and program [light beatbox](/lessons/light-beatbox/activity) music on it. Press the reset button to restart your music player!
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/light-beatbox/activity)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/light-beatbox/activity)!
|
||||
|
||||
### ~
|
||||
|
@ -8,8 +8,8 @@ Music
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/happy-birthday/activity)
|
||||
* [challenges](/microbit/lessons/happy-birthday/challenges)
|
||||
* [activity](/lessons/happy-birthday/activity)
|
||||
* [challenges](/lessons/happy-birthday/challenges)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
Play sounds with music blocks.
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap `New Project` under `Block Editor`.
|
||||
|
||||
Have you ever tried to play a song on an instrument? Let's try coding the song "Happy Birthday" on the micro:bit !
|
||||
|
||||
Let's start by adding the code in the music drawer that includes a single musical chord (or pitched sound) with the `play` block. Then insert the chord "C". Once you are done coding, don't forget to run your code in the simulator or the micro:bit.
|
||||
@ -52,7 +50,7 @@ basic.pause(100);
|
||||
|
||||
### ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/happy-birthday/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/happy-birthday/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -4,7 +4,7 @@ Coding challenges for finishing the song, happy birthday.
|
||||
|
||||
## Before we get started
|
||||
|
||||
Complete the [happy birthday](/microbit/lessons/happy-birthday/activity) activity and your code will look like this:
|
||||
Complete the [happy birthday](/lessons/happy-birthday/activity) activity and your code will look like this:
|
||||
|
||||
|
||||
```blocks
|
||||
|
@ -8,9 +8,9 @@ Collection
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/headbands/activity)
|
||||
* [quiz](/microbit/lessons/headbands/quiz)
|
||||
* [quiz answers](/microbit/lessons/headbands/quiz-answers)
|
||||
* [activity](/lessons/headbands/activity)
|
||||
* [quiz](/lessons/headbands/quiz)
|
||||
* [quiz answers](/lessons/headbands/quiz-answers)
|
||||
|
||||
|
||||
## Class
|
||||
@ -42,19 +42,19 @@ Learn how to create a charades game with **collections**, ` create -> Collection
|
||||
## Documentation
|
||||
|
||||
* **collection**
|
||||
* **global variables** : [read more...](/microbit/js/data)
|
||||
* **Boolean** : [read more...](/microbit/reference/types/boolean)
|
||||
* **on logo up** [read more...](/microbit/functions/on-logo-up)
|
||||
* **on screen down** [read more...](/microbit/functions/on-screen-down)
|
||||
* **on screen up** [read more...](/microbit/functions/on-screen-up)
|
||||
* **show string** : [read more...](/microbit/reference/basic/show-string)
|
||||
* **game library** : [read more...](/microbit/js/game-library)
|
||||
* **global variables** : [read more...](/js/data)
|
||||
* **Boolean** : [read more...](/reference/types/boolean)
|
||||
* **on logo up** [read more...](/functions/on-logo-up)
|
||||
* **on screen down** [read more...](/functions/on-screen-down)
|
||||
* **on screen up** [read more...](/functions/on-screen-up)
|
||||
* **show string** : [read more...](/reference/basic/show-string)
|
||||
* **game library** : [read more...](/js/game-library)
|
||||
|
||||
## Resources
|
||||
|
||||
* Activity: [tutorial](/microbit/lessons/headbands/tutorial)
|
||||
* Activity: [quiz](/microbit/lessons/headbands/quiz)
|
||||
* Extended Activity: [challenges](/microbit/lessons/headbands/challenges)
|
||||
* Activity: [tutorial](/lessons/headbands/tutorial)
|
||||
* Activity: [quiz](/lessons/headbands/quiz)
|
||||
* Extended Activity: [challenges](/lessons/headbands/challenges)
|
||||
|
||||
## Objectives
|
||||
|
||||
@ -112,17 +112,17 @@ Computational Thinking Concept: AB = Abstraction; DE = Decomposition; AL = Algor
|
||||
## Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [tutorial](/microbit/lessons/headbands/tutorial)
|
||||
* [quiz](/microbit/lessons/headbands/quiz)
|
||||
* [tutorial](/lessons/headbands/tutorial)
|
||||
* [quiz](/lessons/headbands/quiz)
|
||||
|
||||
## Extended Activity
|
||||
|
||||
* time: 20 min.
|
||||
* [challenges](/microbit/lessons/headbands/challenges)
|
||||
* [challenges](/lessons/headbands/challenges)
|
||||
|
||||
## Homework
|
||||
|
||||
* Extended Activity: [challenges](/microbit/lessons/headbands/challenges)
|
||||
* Extended Activity: [challenges](/lessons/headbands/challenges)
|
||||
|
||||
## Intended follow on
|
||||
|
||||
|
@ -6,7 +6,7 @@ create a charades game with a collection of strings.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [headbands tutorial](/microbit/lessons/headbands/activity).
|
||||
Use this activity document to guide your work in the [headbands tutorial](/lessons/headbands/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -6,7 +6,7 @@ create a charades game with a collection of strings.
|
||||
|
||||
## Directions
|
||||
|
||||
Use this activity document to guide your work in the [headbands tutorial](/microbit/lessons/headbands/activity).
|
||||
Use this activity document to guide your work in the [headbands tutorial](/lessons/headbands/activity).
|
||||
|
||||
Answer the questions while completing the tutorial. Pay attention to the dialogues!
|
||||
|
||||
|
@ -4,4 +4,4 @@ make a game to test hand-eye coordination.
|
||||
|
||||
Make a game to test hand-eye coordination
|
||||
|
||||
* [activity](/microbit/lessons/hero/activity)
|
||||
* [activity](/lessons/hero/activity)
|
||||
|
@ -8,7 +8,7 @@ Music
|
||||
|
||||
## Quick Links
|
||||
|
||||
* [activity](/microbit/lessons/light-beatbox/activity)
|
||||
* [activity](/lessons/light-beatbox/activity)
|
||||
|
||||
## Prior learning/place of lesson in scheme of work
|
||||
|
||||
|
@ -8,40 +8,30 @@ Have you ever tried to making beat box sounds based on the light level? Let's tr
|
||||
|
||||
### ~
|
||||
|
||||
To create a new script, go to the [Create Code](/microbit/create-code) page and tap *New Project* under *Block Editor*.
|
||||
|
||||
Let's start by adding a variable where you can store data. Then rename the variable to "light". Then set the value of the variable to the block `light level` from the Input drawer. This will gets the `light level` from 0 (dark) to 255 (bright). The light is measured by using various LEDs from the screen. Modify your code so that your code looks like this.
|
||||
|
||||
|
||||
```blocks
|
||||
let light = 0;
|
||||
light = input.lightLevel();
|
||||
let light = input.lightLevel();
|
||||
```
|
||||
|
||||
We want to play music on button pressed in order to register an event handler that will execute whenever when you run a script and click on button pressed on the simulator. We must start by opening the Input drawer and adding `on button pressed` A. Then add a block `rest` to plays nothing for a `1/16` beat. Modify your code so that your code looks like this.
|
||||
|
||||
|
||||
```blocks
|
||||
|
||||
let light = 0;
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
music.rest(music.beat(BeatFraction.Sixteenth));
|
||||
light = input.lightLevel();
|
||||
let light = input.lightLevel();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
We click on the Logic drawer then insert a `if do` that will conditionally run code depending on whether the Boolean condition is true or false. Then insert the variable `light` into the first part of the inequality. The variable "light" will appear in the Variables drawer. Finally, we insert 25. Modify your code so that your code looks like this. If the `light level` is `less than` 25, play `ring tone` `C`. If this conditions is not true, play `ring tone` `A`.
|
||||
|
||||
|
||||
```blocks
|
||||
let light = 0;
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
music.rest(music.beat(BeatFraction.Sixteenth));
|
||||
light = input.lightLevel();
|
||||
let light = input.lightLevel();
|
||||
if (light < 25) {
|
||||
music.ringTone(music.noteFrequency(Note.C));
|
||||
}
|
||||
@ -55,11 +45,9 @@ input.onButtonPressed(Button.A, () => {
|
||||
We click on the Logic drawer then insert a `less than` sign into the first `if` conditional that will conditionally run code depending on whether the Boolean condition is true or false. Continue this logic to continue with these conditional statements. Click on the Logic drawer. Then we want to add additional conditional statements by clicking on the gear to the left of the `if`. Add 05 `else if` and 01 `else` inside the `if do` block structure. If the `light level` is `less than` 50, play `ring tone` ``D``. If the `light level` is `less than` 100, play `ring tone` ``E``. If the `light level` is `less than` 150, play `ring tone` ``F`` If the `light level` is `less than` 180, play `ring tone` ``G``. If these conditions are not true, `ring tone` ``A``.
|
||||
|
||||
```blocks
|
||||
|
||||
let light = 0;
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
music.rest(music.beat(BeatFraction.Sixteenth));
|
||||
light = input.lightLevel();
|
||||
let light = input.lightLevel();
|
||||
if (light < 25) {
|
||||
music.ringTone(music.noteFrequency(Note.C));
|
||||
}
|
||||
@ -79,9 +67,6 @@ input.onButtonPressed(Button.A, () => {
|
||||
music.ringTone(music.noteFrequency(Note.A));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
* click *compile* and run your code on the micro:bit.
|
||||
|
@ -10,10 +10,10 @@ For Loop
|
||||
|
||||
## Quick links
|
||||
|
||||
* [activity](/microbit/lessons/looper/activity)
|
||||
* [challenges](/microbit/lessons/looper/challenges)
|
||||
* [quiz](/microbit/lessons/looper/quiz)
|
||||
* [quiz answers](/microbit/lessons/looper/quiz-answers)
|
||||
* [activity](/lessons/looper/activity)
|
||||
* [challenges](/lessons/looper/challenges)
|
||||
* [quiz](/lessons/looper/quiz)
|
||||
* [quiz answers](/lessons/looper/quiz-answers)
|
||||
|
||||
|
||||
## Class
|
||||
|
@ -38,7 +38,7 @@ for (let i = 0; i < 6; i++) {
|
||||
|
||||
### ~avatar avatar
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/microbit/lessons/looper/challenges)!
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/looper/challenges)!
|
||||
|
||||
### ~
|
||||
|
||||
|
@ -6,7 +6,7 @@ Coding challenges for the looper.
|
||||
|
||||
Complete the following guided activity:
|
||||
|
||||
* [activity](/microbit/lessons/looper/activity)
|
||||
* [activity](/lessons/looper/activity)
|
||||
|
||||
At the end of the activity, your code should look like this:
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user