You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix example and do a few edits (#850)
* Small fixes to the Karel project text (#862)
* fix missing shadow type
* add calibration info (#897)
microbit-support:6348 User reported bug, but didn't realie micro:bit compass had to be calibrated on first run of the program.
* Cherry pick adding various cross-editor compat APIs (#863)
* fix nudge
* Fix a typo ("screent") in the documentation (#1012)
* Fix a typo
"screent" -> "the LED screen"
* Update showArrow doc string for consistency with other methods
* Doc bugs found by xlators (#899)
* Update rotation.md (#998)
reflects actual behaviour of the board
* fixed layout corruption (#1073)
* Updating the new bug filer with the right link
* Update challenges.md (#1325)
For what I'm taught in school, 2 follows 1 😉😉.
* Update simulator.md (#1209)
* Update plant watering.md (#1264)
the connection to servo are male not female
* support for MIDI simulator in v0 (#1331)
* Doc improvements (#1337)
* update grammar in radio-dashboard sample code
* Chanllenge 2 follows 1
I open all challenges.md without "Challenge 2" and review the file
`grep -r "Challenge 2" -L | grep challenge | xargs -I@ code @`
Changes to be committed:
modified: docs/lessons/counter/challenges.md
modified: docs/lessons/game-counter/challenges.md
modified: docs/lessons/night-light/challenges.md
modified: docs/lessons/snowflake-fall/challenges.md
* Revert "support for MIDI simulator in v0 (#1331)"
This reverts commit 30a9c41.
* Revert "Cherry pick adding various cross-editor compat APIs (#863)"
This reverts commit 7308dbe.
* Fixed pin needed to replace button A (#1385)
* Cherry pick part of the signature update in in2cWriteBuffer (#863): 7308dbe
Copy file name to clipboardexpand all lines: docs/device/pins.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Unlike the three large pins that are dedicated to being used for external connec
41
41
42
42
***pin 3**: GPIO shared with LED Col 1 of the LED screen; can be used for ADC and digital I/O when the LED screen is turned off.
43
43
***pin 4**: GPIO shared with LED Col 2 of the LED screen; can be used for ADC and digital I/O when the LED screen is turned off.
44
-
***pin 5**: GPIO shared with Button A. This lets you trigger or detect a button "A" click externally. This pin has a pull-up resistor, which means that by default it is at voltage of 3V. To replace button A on the micro:bit with an external button, connect one end of the external button to pin 4 and the other end to GND. When the button is pressed, the voltage on pin 4 is pulled down to 0, which generates a button click event.
44
+
***pin 5**: GPIO shared with Button A. This lets you trigger or detect a button "A" click externally. This pin has a pull-up resistor, which means that by default it is at voltage of 3V. To replace button A on the micro:bit with an external button, connect one end of the external button to pin 5 and the other end to GND. When the button is pressed, the voltage on pin 5 is pulled down to 0, which generates a button click event.
45
45
***pin 6**: GPIO shared with LED Col 9 of the LED screen; can be used for digital I/O when the LED screen is turned off.
46
46
***pin 7**: GPIO shared with LED Col 8 of the LED screen; can be used for digital I/O when the LED screen is turned off.
47
47
***pin 8**: Dedicated GPIO, for sending and sensing digital signals.
Copy file name to clipboardexpand all lines: docs/device/screen.md
+6-9
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# LED screen
2
2
3
-
The micro:bit LED screen
4
-
5
3
```sim
6
4
basic.showLeds(`
7
5
# . # . #
@@ -12,7 +10,7 @@ The micro:bit LED screen
12
10
`);
13
11
```
14
12
15
-
The micro:bit LED screen consists of 25 red LED lights arranged in a 5X5 grid (5 LEDs across by 5 LEDs down).
13
+
The micro:bit LED screen has 25 red LED lights arranged in a 5X5 grid (5 LEDs across by 5 LEDs down).
16
14
In the screen above, we created a checkerboard pattern using the LEDs.
17
15
18
16
## Which LED?
@@ -35,7 +33,7 @@ Here are the x, y coordinates for the LEDs in the 5X5 grid:
35
33
36
34
`(0,4)``(1,4)``(2,4)``(3,4)``(4,4)`
37
35
38
-
The x, y coordinates for the LED in the centre of the grid are `(2,2)`. Starting from `(0,0)` count over 2 columns and then down 2 rows.
36
+
The x, y coordinates for the LED in the center of the grid are `(2,2)`. Starting from `(0,0)` count over 2 columns and then down 2 rows.
39
37
40
38
## Check your understanding
41
39
@@ -71,11 +69,11 @@ if(led.point(0,0)) {
71
69
72
70
## Display images, strings and numbers
73
71
74
-
Instead of turning individual LEDs on or off, as above, you can display an [image](/reference/images/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.
72
+
Instead of turning individual LEDs on or off, as above, you can display an [image](/reference/images/image) directly to the screen or show text and numbers on screen using the [show number](/reference/basic/show-number) and [show string](/reference/basic/show-string)functions.
75
73
76
74
## The display buffer
77
75
78
-
The micro:bit runtime keeps an in-memory representation of the state of all 25 LEDS. This state is known as the "display buffer" and controls which LEDS are on and which are off. The plot/unplot/point functions access the display buffer directly. On the other hand, the functions that show an image, number or string overwrite the buffer completely. To illustrate, first try running this code sequence
76
+
The micro:bit runtime keeps a representation of the state of all 25 LEDS in memory. This state is known as the "display buffer" and controls which LEDs are on and which are off. The plot, unplot, and point functions access the display buffer directly. On the other hand, the functions that show an image, number, or string overwrite the buffer completely. To illustrate this, first try running this code sequence
79
77
80
78
```blocks
81
79
basic.showString("d")
@@ -86,15 +84,14 @@ You will see the letter "d" displayed as well as the LED in position `0,0` lit u
86
84
87
85
```blocks
88
86
led.plot(0, 0)
89
-
basic.showString("d", 150)
87
+
basic.showString("d")
90
88
```
91
89
92
90
You will not see the LED at position `0,0` lit up because the `show string` function overwrites the whole display buffer.
93
91
94
-
95
92
## Pins: P3, P4, P6, P7, P9, P10
96
93
97
-
These pins are coupled to the LED matrix display, and also it’s associated ambient light sensing mode.
94
+
These pins are coupled to the LED matrix display and also to the display's associated ambient light sensing mode.
98
95
To disable the display driver feature (which will automatically disable the light sensing feature) use the function [led.enable](/reference/led/enable).
99
96
100
97
More information at http://tech.microbit.org/hardware/edgeconnector_ds/ .
Now you just need to program your own @boardname@ and practice the trick a few times before performing for your friends. Try asking your friends to click the buttons after you have switched the labels and the trick won't work for them because they don't have a hidden magnet in their hand!
100
100
101
+
Remember, that as we are using @boardname@'s compass, it will need to be [calibrated](https://support.microbit.org/support/solutions/articles/19000008874-calibrating-the-micro-bit-compass-what-does-it-mean-when-the-micro-bit-says-draw-a-circle-or-tilt) each time we flash the program or run it for the first time.
102
+
101
103
## About the authors
102
104
103
-
This project was contributed by Brian and Jasmine Norman, aka [@MicroMonstersUK](https://twitter.com/MicroMonstersUK). You can checkout their [MicroMonsters](https://www.youtube.com/channel/UCK2DviDexh_Er2QYZerZyZQ) tutorials channel on YouTube for more projects.
105
+
This project was contributed by Brian and Jasmine Norman, aka [@MicroMonstersUK](https://twitter.com/MicroMonstersUK). You can checkout their [MicroMonsters](https://www.youtube.com/channel/UCK2DviDexh_Er2QYZerZyZQ) tutorials channel on YouTube for more projects.
Copy file name to clipboardexpand all lines: docs/reference/input/rotation.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ check how the @boardname@ is moving.
19
19
20
20
## Returns
21
21
22
-
* a [number](/types/number) that means how much the microbit is tilted in the direction you say, from `-180` to `180` degrees
22
+
* a [number](/types/number) that means how much the microbit is tilted in the direction you say; for `Rotation.Pitch`from `-90` to `90` degrees and for `Rotation.Roll` from `-180` to `180` degrees.
0 commit comments