batch fixing ](/microbit/ -> ](/ links
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user