Soil - moisture (#418)
* updated servo calibrator * updated plot analog pin example * updated servo example * first drop of soil moisture * updated picture * fixing macros * update code section * 5 seconds * adding soil moisture * fixing links
This commit is contained in:
@ -1,10 +1,18 @@
|
||||
# Plot Analog Pin
|
||||
|
||||
Use this program to graph the analog value on pin ``P0``, ``P1`` or ``P2``.
|
||||
Press ``A`` to scroll the value on the screen.
|
||||
|
||||
```blocks
|
||||
let reading = 0
|
||||
basic.forever(() => {
|
||||
reading = pins.analogReadPin(AnalogPin.P0)
|
||||
led.plotBarGraph(
|
||||
pins.analogReadPin(AnalogPin.P0),
|
||||
reading,
|
||||
1023
|
||||
)
|
||||
if (input.buttonIsPressed(Button.A)) {
|
||||
basic.showNumber(reading)
|
||||
}
|
||||
})
|
||||
```
|
||||
|
Reference in New Issue
Block a user