inserting macros instead of hard coded board names
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Find the light level (how bright or dark it is) where you are.
|
||||
The light level ``0`` means darkness and ``255`` means bright light.
|
||||
The BBC micro:bit measures the light around it by using some of the
|
||||
The @boardname@ measures the light around it by using some of the
|
||||
LEDs on the [LED screen](/device/screen).
|
||||
|
||||
The first time you use it, this function will say ``0``.
|
||||
|
@ -3,7 +3,7 @@
|
||||
Start an [event handler](/reference/event-handler) (part of the program that will run when something happens, like when a button is pressed).
|
||||
This handler works when button `A` or `B` is pressed, or `A` and `B` together.
|
||||
When you are using this function in a web browser, click the buttons on the screen instead of the ones
|
||||
on the BBC micro:bit.
|
||||
on the @boardname@.
|
||||
|
||||
```sig
|
||||
input.onButtonPressed(Button.A, () => {})
|
||||
|
@ -19,7 +19,7 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
|
||||
## ~hint
|
||||
|
||||
This function works best when the BBC micro:bit is using batteries for power,
|
||||
This function works best when the @boardname@ is using batteries for power,
|
||||
instead of the USB cable.
|
||||
|
||||
## ~
|
||||
@ -44,5 +44,5 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
|
||||
### See also
|
||||
|
||||
[BBC 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)
|
||||
[@boardname@ 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)
|
||||
|
||||
|
@ -19,7 +19,7 @@ input.onPinReleased(TouchPin.P0, () => {
|
||||
|
||||
## ~hint
|
||||
|
||||
This function works best when the BBC micro:bit is using batteries for power,
|
||||
This function works best when the @boardname@ is using batteries for power,
|
||||
instead of the USB cable.
|
||||
|
||||
## ~
|
||||
@ -44,5 +44,5 @@ input.onPinReleased(TouchPin.P0, () => {
|
||||
|
||||
### See also
|
||||
|
||||
[BBC 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)
|
||||
[@boardname@ 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)
|
||||
|
||||
|
@ -12,7 +12,7 @@ input.pinIsPressed(TouchPin.P0);
|
||||
|
||||
## ~hint
|
||||
|
||||
This function works best when the BBC micro:bit is using batteries for power,
|
||||
This function works best when the @boardname@ is using batteries for power,
|
||||
instead of the USB cable.
|
||||
|
||||
## ~
|
||||
@ -41,5 +41,5 @@ basic.forever(() => {
|
||||
|
||||
### See also
|
||||
|
||||
[BBC micro:bit pins](/device/pins), [on pin pressed](/reference/input/on-pin-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)
|
||||
[@boardname@ pins](/device/pins), [on pin pressed](/reference/input/on-pin-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)
|
||||
|
||||
|
@ -8,7 +8,7 @@ input.rotation(Rotation.Roll);
|
||||
|
||||
## ~hint
|
||||
|
||||
The BBC micro:bit has a part called the **accelerometer** that can
|
||||
The @boardname@ has a part called the **accelerometer** that can
|
||||
check how the micro:bit is moving.
|
||||
|
||||
## ~
|
||||
@ -23,7 +23,7 @@ check how the micro:bit is moving.
|
||||
|
||||
### Example: micro:bit leveler
|
||||
|
||||
This program helps you move the BBC micro:bit until it is level. When
|
||||
This program helps you move the @boardname@ until it is level. When
|
||||
it is level, the micro:bit shows a smiley.
|
||||
|
||||
If you are running this program in a browser, you can tilt the
|
||||
|
@ -13,7 +13,7 @@ input.temperature();
|
||||
|
||||
### How does it work?
|
||||
|
||||
The BBC micro:bit checks how hot its CPU (main computer chip) is.
|
||||
The @boardname@ checks how hot its CPU (main computer chip) is.
|
||||
Because the micro:bit does not usually get very hot, the temperature of the CPU
|
||||
is usually close to the temperature of wherever you are.
|
||||
The micro:bit might warm up a little if you make it work hard, though!
|
||||
|
Reference in New Issue
Block a user