Skip to content

Commit

Permalink
Update lua.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Цуркан Алексей Владимирович committed May 13, 2024
1 parent 21d2433 commit 694847e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions lua.md
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,36 @@ gpio.pwmSetup(3, 32)
gpio.pwm(3, 255/100*50)
```

<!--
#### gpio.pwmSetup()
Настройка ШИМ
```lua
gpio.pwmSetup(pin[, freq = 5000[, resolution = 8]])
-- pin: номер контакта
-- resolution: разрешение 1-16 bits
-- freq: частота
```
#### gpio.pwm()
Управление ШИМ
```lua
gpio.pwm(pin, value)
-- pin: номер контакта
-- value: значение ШИМ
```
Например, задать каналу 1 режим выхода и включить ШИМ со скважностью 50%
```lua
gpio.pwmSetup(32)
gpio.pwm(32, 255/100*50)
```
-->

---

### Библиотека AUDIO
Expand Down

0 comments on commit 694847e

Please sign in to comment.