translator, wb_editors
4544
правки
Matveevrj (обсуждение | вклад) (Новая страница: «runShellCommand("echo " + period + " > /sys/class/pwm/pwmchip0/pwm2/period"); runShellCommand("echo " + duty_cycle + " > /sys/class/pwm/pwmchip0/pwm2/duty_cycle"); };») Метки: правка с мобильного устройства правка из мобильной версии |
Matveevrj (обсуждение | вклад) (Новая страница: «=== CO2 === When the CO2 concentration is less than 650, we flash green once every 10 seconds.») Метки: правка с мобильного устройства правка из мобильной версии |
||
Строка 545: | Строка 545: | ||
=== Power status rule === | === Power status rule === | ||
[https://github.com/contactless/wb-rules-system/blob/master/rules/power_status.js Rule] creates a virtual device that reports the current power status. Two ADC channels are used as input data: battery voltage measurement and input voltage measurement. | |||
[https://github.com/contactless/wb-rules-system/blob/master/rules/power_status.js | |||
The following logic is implemented: | |||
1. If the input voltage is less than the battery voltage, then the board is powered by the battery. In this case, 0V is also displayed as the input voltage. | |||
1. | |||
<div lang="ru" dir="ltr" class="mw-content-ltr"> | <div lang="ru" dir="ltr" class="mw-content-ltr"> |