Some edits to 'soil moisture' projects
This commit is contained in:
@ -1,15 +1,12 @@
|
||||
# Connect
|
||||
|
||||
We are going to use radio to send the current moisture
|
||||
level to a dashboard @boardname@. The dashboard
|
||||
will display one LED per @boardname@.
|
||||
Use the radio to send the current moisture level to a dashboard @boardname@. The dashboard will display one LED per @boardname@.
|
||||
|
||||
## Moisture sensor
|
||||
|
||||
To make it happen, we need to change the program to
|
||||
To make it happen, we need to change the program to:
|
||||
* setup the radio by choosing group 4 and sending the serial number of the device
|
||||
* send the moisture level **divided by 4**
|
||||
as the dashboard takes values between ``0`` and ``255``.
|
||||
* send the moisture level **divided by 4** as the dashboard takes values between ``0`` and ``255``.
|
||||
|
||||
```blocks
|
||||
radio.setTransmitSerialNumber(true)
|
||||
@ -34,15 +31,17 @@ basic.forever(() => {
|
||||
|
||||
## The dashboard
|
||||
|
||||
The dashboard code can be found at [/examples/radio-dashboard](/examples/radio-dashboard).
|
||||
The dashboard code is found in the [radio dashboard](/examples/radio-dashboard) example.
|
||||
|
||||
Download the code from that example into the @boardname@ that will be used to display the result.
|
||||
### Setup a dashboard @boardname@
|
||||
|
||||
When the dashboard receives a message from a @boardname@, it find a pixel for that board (and remembers it)
|
||||
and uses the number received as the brightness of the LED.
|
||||
Download the code from that example into the @boardname@ that will be used to display the results.
|
||||
|
||||
When a message hasn't been received by a board for some time, it's pixel will start to blink. After more time, it will simply turn off.
|
||||
### Dashboard operation
|
||||
|
||||
When the dashboard receives a message from a @boardname@, it finds a pixel to use for that board (and remembers it). The number sent in the messages from the board are used to set the brightness of the LED.
|
||||
|
||||
When a message hasn't been received by the dashboard for awhile, it's pixel will start to blink. Then, after some time, it will simply turn off.
|
||||
|
||||
```package
|
||||
radio
|
||||
|
Reference in New Issue
Block a user