mirror of
https://github.com/alankrantas/microbit-micropython-cookbook.git
synced 2026-01-04 19:31:22 +01:00
Update README.md
This commit is contained in:
@@ -475,7 +475,6 @@ def find_primes(n): # calculate primes up to n
|
|||||||
primes.append(p_test)
|
primes.append(p_test)
|
||||||
return primes
|
return primes
|
||||||
|
|
||||||
|
|
||||||
primes = find_primes(50)
|
primes = find_primes(50)
|
||||||
print(primes)
|
print(primes)
|
||||||
for prime in primes:
|
for prime in primes:
|
||||||
@@ -604,6 +603,8 @@ Due to some reason, the signal strength or RSSI changes very little regardless o
|
|||||||
If there's no signal received the strength data would be set as zero.
|
If there's no signal received the strength data would be set as zero.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
|
RADIO_CHANNEL = 42
|
||||||
|
|
||||||
from microbit import display, sleep
|
from microbit import display, sleep
|
||||||
import radio
|
import radio
|
||||||
|
|
||||||
@@ -622,7 +623,7 @@ def plotBarGraph(value, max_value, b=9):
|
|||||||
counter += 1
|
counter += 1
|
||||||
|
|
||||||
|
|
||||||
radio.config(group=42, power=7)
|
radio.config(group=RADIO_CHANNEL, power=7)
|
||||||
radio.on()
|
radio.on()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
Reference in New Issue
Block a user