8000 docs: Radio is now turned on during import. (#763) · bbcmicrobit/micropython@de00471 · GitHub
[go: up one dir, main page]

Skip to content

Commit de00471

Browse files
docs: Radio is now turned on during import. (#763)
1 parent f955e8a commit de00471

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

docs/radio.rst

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ Functions
4848

4949
.. py:function:: on()
5050
51-
Turns the radio on. This needs to be explicitly called since the radio
52-
draws power and takes up memory that you may otherwise need.
51+
Turns the radio on.
52+
53+
Since MicroPython-on-micro:bit v1.1
54+
the radio is turned on by default when the radio module is imported.
55+
In earlier releases, to reduce power consumption until needed, this
56+
function had to be explicitly called.
57+
For those cases ``radio.off()`` can be called after import.
5358

5459
.. py:function:: off()
5560

docs/tutorials/radio.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ We're going to use the radio module to create something akin to a swarm of
107107
fireflies signalling to each other.
108108

109109
First ``import radio`` to make the functions available to your Python program.
110-
Then call the ``radio.on()`` function to turn the radio on. Since
111-
the radio draws power and takes up memory we've made it so *you* decide
112-
when it is enabled (there is, of course a ``radio.off()`` function).
113-
114110
At this point the radio module is configured to sensible defaults that make
115111
it compatible with other platforms that may target the BBC micro:bit. It is
116112
possible to control many of the features discussed above (such as channel and

examples/radio.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
# Create the "flash" animation frames. Can you work out how it's done?
88
flash = [Image().invert()*(i/9) for i in range(9, -1, -1)]
99

10-
# The radio won't work unless it's switched on.
11-
radio.on()
12-
1310
# Event loop.
1411
while True:
1512
# Button A sends a "flash" message.

0 commit comments

Comments
 (0)
0