Fixing parameters
This commit is contained in:
parent
1831c30050
commit
aa6a965f59
@ -9,8 +9,13 @@ led.plotBarGraph(2, 20);
|
||||
|
||||
### Parameters
|
||||
|
||||
* `value` is a [Number](/reference/types/number) that means what you are measuring or trying to show. For example, if you are measuring the temperature of ice with the BBC micro:bit, `value` might be 0 because the temperature might be 0 degrees centigrade.
|
||||
* `high` is a [Number](/reference/types/number) that means the highest possible number that the `value` parameter can be. This number is also the tallest that the lines in the bar chart can be.
|
||||
* ``value`` is a [number](/reference/types/number) that means what you
|
||||
are measuring or trying to show. For example, if you are measuring
|
||||
the temperature of ice with the BBC micro:bit, ``value`` might be `0`
|
||||
because the temperature might be 0 degrees centigrade.
|
||||
* ``high`` is a [number](/reference/types/number) that means the highest
|
||||
possible number that the ``value`` parameter can be. This number is
|
||||
also the tallest that the lines in the bar chart can be.
|
||||
|
||||
### Example: chart acceleration
|
||||
|
||||
|
@ -14,8 +14,11 @@ Use [unplot](/reference/led/unplot) to turn **off** an LED.
|
||||
|
||||
### Parameters
|
||||
|
||||
* **x** is a [number](/reference/types/number) that means the horizontal spot on the LED screen (from left to right: 0, 1, 2, 3, or 4)
|
||||
* **y** is a [number](/reference/types/number) that means the vertical spot on the LED screen (from top to bottom: 0, 1, 2, 3, or 4)
|
||||
* ``x`` is a [number](/reference/types/number) that means the
|
||||
horizontal spot on the LED screen (from left to right: 0, 1, 2, 3,
|
||||
or 4)
|
||||
* ``y`` is a [number](/reference/types/number) that means the vertical
|
||||
spot on the LED screen (from top to bottom: 0, 1, 2, 3, or 4)
|
||||
|
||||
If a parameter is [out of bounds](/reference/out-of-bounds) (a value
|
||||
other than 0 to 4), then this function will do nothing.
|
||||
|
@ -9,8 +9,11 @@ led.point(0,0);
|
||||
|
||||
### Parameters
|
||||
|
||||
* **x** is a [number](/reference/types/number) that means the horizontal spot on the LED screen (from left to right: 0, 1, 2, 3, or 4)
|
||||
* **y** is a [number](/reference/types/number) that means the vertical spot on the LED screen (from top to bottom: 0, 1, 2, 3, or 4)
|
||||
* ``x`` is a [number](/reference/types/number) that means the
|
||||
horizontal spot on the LED screen (from left to right: 0, 1, 2, 3,
|
||||
or 4)
|
||||
* ``y`` is a [number](/reference/types/number) that means the vertical
|
||||
spot on the LED screen (from top to bottom: 0, 1, 2, 3, or 4)
|
||||
|
||||
If a parameter is [out of bounds](/reference/out-of-bounds) (a value
|
||||
other than 0 to 4), this function will return `false`.
|
||||
|
@ -9,13 +9,16 @@ led.setBrightness(121)
|
||||
|
||||
### Parameters
|
||||
|
||||
* a [number](/reference/types/number) that means how bright the screen is when it is turned on, from `0` (darkest) to `255` (brightest). For example, the number `127` means the screen is halfway bright when it is turned on.
|
||||
* ``value`` is a [number](/reference/types/number) that means how
|
||||
bright the screen is when it is turned on, from `0` (darkest) to
|
||||
`255` (brightest). For example, the number `127` means the screen is
|
||||
halfway bright when it is turned on.
|
||||
|
||||
### Example: change brightness
|
||||
|
||||
This program makes the screen brightness 100% (255). Then it turns on
|
||||
This program makes the screen brightness 100% (`255`). Then it turns on
|
||||
the center LED (`2, 2`), waits for one second, and then sets the screen
|
||||
brightness to 50% (128):
|
||||
brightness to 50% (`128`):
|
||||
|
||||
```blocks
|
||||
led.setBrightness(255)
|
||||
@ -27,4 +30,3 @@ led.setBrightness(led.brightness() / 2)
|
||||
### See also
|
||||
|
||||
[brightness](/reference/led/brightness), [fade in](/reference/led/fade-in), [fade out](/reference/led/fade-out), [LED screen](/device/screen)
|
||||
|
||||
|
@ -14,8 +14,11 @@ Use [plot](/reference/led/plot) to turn **on** an LED.
|
||||
|
||||
### Parameters
|
||||
|
||||
* **x** is a [number](/reference/types/number) that means the horizontal spot on the LED screen (from left to right: 0, 1, 2, 3, or 4)
|
||||
* **y** is a [number](/reference/types/number) that means the vertical spot on the LED screen (from top to bottom: 0, 1, 2, 3, or 4)
|
||||
* ``x`` is a [number](/reference/types/number) that means the
|
||||
horizontal spot on the LED screen (from left to right: 0, 1, 2, 3,
|
||||
or 4)
|
||||
* ``y`` is a [number](/reference/types/number) that means the vertical
|
||||
spot on the LED screen (from top to bottom: 0, 1, 2, 3, or 4)
|
||||
|
||||
If a parameter is [out of bounds](/reference/out-of-bounds) (a value
|
||||
other than 0 to 4), then this function will do nothing.
|
||||
|
Loading…
Reference in New Issue
Block a user