updated about
This commit is contained in:
parent
eb7582bb56
commit
53724c4b63
@ -2,6 +2,24 @@
|
|||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
basic.showString("Hi!");
|
basic.showString("Hi!");
|
||||||
})
|
})
|
||||||
|
input.onButtonPressed(Button.A, () => {
|
||||||
|
led.stopAnimation();
|
||||||
|
basic.showLeds(`
|
||||||
|
. . . . .
|
||||||
|
. # . # .
|
||||||
|
. . . . .
|
||||||
|
# . . . #
|
||||||
|
. # # # .`);
|
||||||
|
});
|
||||||
|
input.onButtonPressed(Button.B, () => {
|
||||||
|
led.stopAnimation();
|
||||||
|
basic.showLeds(`
|
||||||
|
. # . # .
|
||||||
|
# . # . #
|
||||||
|
# . . . #
|
||||||
|
. # . # .
|
||||||
|
. . # . .`);
|
||||||
|
});
|
||||||
```
|
```
|
||||||
# About
|
# 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.
|
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.
|
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
|
## 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,
|
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user