mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 11:43:25 +00:00
docs: add gpio info to block article
This commit is contained in:
@@ -546,7 +546,7 @@ Blockly.Blocks['gpio_read'] = {
|
||||
this.setOutput(true, "Boolean");
|
||||
this.setColour(COLOR_GPIO);
|
||||
this.setTooltip("Returns if there is voltage on a GPIO pin.");
|
||||
this.setHelpUrl(DOCS_URL + '#' + this.type);
|
||||
this.setHelpUrl(DOCS_URL + '#GPIO');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -563,7 +563,7 @@ Blockly.Blocks['gpio_write'] = {
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
this.setTooltip("Set GPIO pin level.");
|
||||
this.setHelpUrl(DOCS_URL + '#' + this.type);
|
||||
this.setHelpUrl(DOCS_URL + '#GPIO');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -580,6 +580,6 @@ Blockly.Blocks['set_servo'] = {
|
||||
this.setPreviousStatement(true, null);
|
||||
this.setNextStatement(true, null);
|
||||
this.setTooltip("Set PWM on a GPIO pin to control servo. PWM is specified in range of 500–2500 μs.");
|
||||
this.setHelpUrl(DOCS_URL + '#' + this.type);
|
||||
this.setHelpUrl(DOCS_URL + '#GPIO');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -108,3 +108,14 @@ The block allows to set animations to LED strip, similarly to [`set_effect`](led
|
||||
Example of using the block with a random color (colors-related blocks are located in *Colour* category):
|
||||
|
||||
<img src="../assets/blocks/random-color.png" srcset="../assets/blocks/random-color.png 2x">
|
||||
|
||||
### Work with GPIO {#GPIO}
|
||||
|
||||
<span style="padding:2px;color:white;background:#5b97cc">GPIO</span> category contains blocks for working with GPIO. Note, that for correct work of these blocks, `pigpiod` daemon should be running:
|
||||
|
||||
```bash
|
||||
sudo systemctl enable pigpiod.service
|
||||
sudo systemctl start pigpiod.service
|
||||
```
|
||||
|
||||
See details on GPIO in the [appropriate article](gpio.md).
|
||||
|
||||
@@ -108,3 +108,14 @@
|
||||
Пример использования блока для установки случайного цвета (блоки, связанные с цветами находятся в категории *Colour*):
|
||||
|
||||
<img src="../assets/blocks/random-color.png" srcset="../assets/blocks/random-color.png 2x">
|
||||
|
||||
### Работа с GPIO {#GPIO}
|
||||
|
||||
Категория <span style="padding:2px;color:white;background:#5b97cc">GPIO</span> содержит блоки для работы с GPIO. Обратите внимание, что для корректной работы этих блоков демон для работы с GPIO `pigpiod` должен быть включен:
|
||||
|
||||
```bash
|
||||
sudo systemctl enable pigpiod.service
|
||||
sudo systemctl start pigpiod.service
|
||||
```
|
||||
|
||||
Более подробную информацию о GPIO читайте в [соответствующей статье](gpio.md).
|
||||
|
||||
Reference in New Issue
Block a user