Mailbot example works now.
This commit is contained in:
parent
7f9f14df18
commit
f9409b5fb5
|
@ -2,18 +2,6 @@
|
||||||
|
|
||||||
Broadcasts a number data packet to other micro:bits connected via ``radio``.
|
Broadcasts a number data packet to other micro:bits connected via ``radio``.
|
||||||
|
|
||||||
## Important Security Consideration
|
|
||||||
|
|
||||||
The functions in the ``radio`` namespace allow the BBC micro:bit to communicate with other micro:bits.
|
|
||||||
|
|
||||||
This API does not contain any form of encryption, authentication or authorization. It's purpose is solely for use as a teaching aid to demonstrate how simple communications operates, and to provide a sandpit through which learning can take place.
|
|
||||||
|
|
||||||
For serious applications, BLE should be considered a substantially more secure alternative.
|
|
||||||
|
|
||||||
```sig
|
|
||||||
radio.sendNumber(0)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Parameters
|
### Parameters
|
||||||
|
|
||||||
* packet - a number to be transmitted.
|
* packet - a number to be transmitted.
|
||||||
|
@ -64,7 +52,7 @@ let max = 0
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
let level = radio.receiveNumber()
|
let level = radio.receiveNumber()
|
||||||
if (level > max) {
|
if (level > max) {
|
||||||
let max = level
|
max = level
|
||||||
}
|
}
|
||||||
if (max > 10) {
|
if (max > 10) {
|
||||||
basic.showString("ALERT")
|
basic.showString("ALERT")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user