Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update faq_rus.md #55

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Update faq_rus.md #55

merged 1 commit into from
Nov 5, 2020

Conversation

dimon78
Copy link
Contributor

@dimon78 dimon78 commented Oct 14, 2020

Управление светодиодами через GPIO

Вариант #1

gpio.pwm(0, 0-255) - R
gpio.pwm(1, 0-255) - G
gpio.pwm(2, 0-255) - B

https://github.com/dimon78/sls.lua/blob/main/flame.lua
https://github.com/dimon78/sls.lua/blob/main/spectrum.lua

Вариант #2

gpio.mode(27, 2)
gpio.write(27, 0-1) - R
gpio.mode(5, 2)
gpio.write(5, 0-1) - G
gpio.mode(21, 2)
gpio.write(21, 0-1) - B

Внимание! Номера пинов соответствуют плате с sd-картой!

Для прямого управления через пины gpio, необходимо в конфигурации шлюза убрать привязку RGB

https://github.com/dimon78/sls.lua/blob/main/led.lua

@Avenitos Avenitos merged commit dd64448 into slsys:master Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants