updated getting-started intro
This commit is contained in:
parent
c55716e148
commit
63913c2182
@ -2,16 +2,13 @@
|
|||||||
|
|
||||||
## ~avatar
|
## ~avatar
|
||||||
|
|
||||||
Are you ready to build cool micro:bit programs?
|
|
||||||
|
|
||||||
Here are some challenges for you. Arrange the blocks in the editor
|
Here are some challenges for you. Arrange the blocks in the editor
|
||||||
to make real programs that work!
|
to make real programs that work!
|
||||||
|
|
||||||
## ~
|
## ~
|
||||||
|
|
||||||
Use the **Basic** drawer in the editor (to the left)
|
Use the **Basic** drawer in the editor
|
||||||
to drag out and arrange three blocks (two `show leds` and one `forever` block)
|
to drag out and arrange three blocks to create this program:
|
||||||
to create this program:
|
|
||||||
|
|
||||||
```blocks
|
```blocks
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
|
8
libs/microbit/shims.d.ts
vendored
8
libs/microbit/shims.d.ts
vendored
@ -301,7 +301,7 @@ declare namespace input {
|
|||||||
* Sets the accelerometer sample range in gravities.
|
* Sets the accelerometer sample range in gravities.
|
||||||
* @param range a value describe the maximum strengh of acceleration measured
|
* @param range a value describe the maximum strengh of acceleration measured
|
||||||
*/
|
*/
|
||||||
//% help=input/set-accelerator-range
|
//% help=input/set-accelerometer-range
|
||||||
//% blockId=device_set_accelerometer_range block="set accelerometer|range %range" icon="\uf135"
|
//% blockId=device_set_accelerometer_range block="set accelerometer|range %range" icon="\uf135"
|
||||||
//% weight=5 shim=input::setAccelerometerRange
|
//% weight=5 shim=input::setAccelerometerRange
|
||||||
function setAccelerometerRange(range: AcceleratorRange): void;
|
function setAccelerometerRange(range: AcceleratorRange): void;
|
||||||
@ -497,7 +497,7 @@ declare namespace pins {
|
|||||||
/**
|
/**
|
||||||
* Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulsed`` handler.
|
* Gets the duration of the last pulse in micro-seconds. This function should be called from a ``onPulsed`` handler.
|
||||||
*/
|
*/
|
||||||
//% help=pins/pulse-micros
|
//% help=pins/pulse-duration
|
||||||
//% blockId=pins_pulse_duration block="pulse duration (µs)"
|
//% blockId=pins_pulse_duration block="pulse duration (µs)"
|
||||||
//% weight=21 shim=pins::pulseDuration
|
//% weight=21 shim=pins::pulseDuration
|
||||||
function pulseDuration(): number;
|
function pulseDuration(): number;
|
||||||
@ -540,7 +540,7 @@ declare namespace pins {
|
|||||||
* @param name pin to set the pull mode on
|
* @param name pin to set the pull mode on
|
||||||
* @param pull one of the mbed pull configurations: PullUp, PullDown, PullNone
|
* @param pull one of the mbed pull configurations: PullUp, PullDown, PullNone
|
||||||
*/
|
*/
|
||||||
//% help=pins/digital-set-pull weight=3
|
//% help=pins/set-pull weight=3
|
||||||
//% blockId=device_set_pull block="set pull|pin %pin|to %pull" shim=pins::setPull
|
//% blockId=device_set_pull block="set pull|pin %pin|to %pull" shim=pins::setPull
|
||||||
function setPull(name: DigitalPin, pull: PinPullMode): void;
|
function setPull(name: DigitalPin, pull: PinPullMode): void;
|
||||||
|
|
||||||
@ -592,7 +592,7 @@ declare namespace serial {
|
|||||||
* @param baud the new baud rate. eg: 115200
|
* @param baud the new baud rate. eg: 115200
|
||||||
*/
|
*/
|
||||||
//% weight=10
|
//% weight=10
|
||||||
//% help=serial/redirect
|
//% help=serial/redirect-to
|
||||||
//% blockId=serial_redirect block="serial redirect to|TX %tx|RX %rx|at baud rate %rate"
|
//% blockId=serial_redirect block="serial redirect to|TX %tx|RX %rx|at baud rate %rate"
|
||||||
//% blockExternalInputs=1 shim=serial::redirect
|
//% blockExternalInputs=1 shim=serial::redirect
|
||||||
function redirect(tx: SerialPin, rx: SerialPin, rate: BaudRate): void;
|
function redirect(tx: SerialPin, rx: SerialPin, rate: BaudRate): void;
|
||||||
|
Loading…
Reference in New Issue
Block a user