Shantur Rathore e4903c5184
Implement button push using servo motors controlled via pwm (#55)
1. Add to /boot/config.txt
```
dtoverlay=pwm
```

2. Create /etc/udev/rules.d/99-kvmd-pwm.rules
```
SUBSYSTEM=="pwm*", ACTION=="add", RUN+="/bin/chgrp -R kvmd /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
SUBSYSTEM=="pwm*", ACTION=="change", ENV{TRIGGER}!="none", RUN+="/bin/chgrp -R kvmd /sys%p", RUN+="/bin/chmod -R g=u /sys%p"
```

3. Connect Servo motor like SG90 PWM connection to RPi GPIO18, +5V and GND to a 5V and GND pin on header

4. Add to /etc/kvmd/override.yaml
```
kvmd:
    gpio:
        drivers:
            servo1:
                type: pwm
                pwm_chip: 0                  # PWM Chip Number
                pwm_period: 20000000         # Servo Motor SG90 Period in nano-seconds
                duty_cycle_push: 1500000     # Servo Motor SG90 duty_cycle for pushing button
                duty_cycle_release: 1000000  # Servo Motor SG90 duty_cycle for releasing button
        scheme:
            short_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 0.5
                    max_delay: 2
            long_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 2
                    max_delay: 2
            extra_long_press:
                driver: servo1
                pin: 0                       # Pin number is the PWM channel number on the PWM Chip
                mode: output
                switch: false
                pulse:
                    delay: 10
                    max_delay: 20
        view:
            header:
                title: Controls
            table:
                - ["#Servo - Short Press", "short_press|Press"]
                - ["#Servo - Long Press", "long_press|Press"]
                - ["#Servo - Extra Long Press", "extra_long_press|Press"]
```
2021-08-14 01:14:22 +03:00
2020-10-17 02:21:39 +03:00
2021-06-17 18:40:53 +03:00
2021-07-23 11:28:53 +03:00
2021-08-14 00:30:41 +03:00
2021-08-11 17:11:28 +03:00
2021-07-27 04:16:53 +03:00
2021-07-25 04:22:27 +03:00
2021-01-07 10:33:02 +03:00
2021-07-03 09:58:09 +03:00
2021-08-02 23:10:46 +03:00
2018-09-26 02:57:24 +03:00
2021-07-16 19:39:11 +03:00
2020-05-11 06:25:54 +03:00
2021-08-11 17:11:28 +03:00

KVMD

CI Discord

This repository contains the configuration and code of KVMD, the main PI-KVM daemon. If your request does not relate directly to this codebase, please send it to issues of the Pi-KVM repository.

Description
One-KVM 是基于廉价计算机硬件和 PiKVM 软件二次开发的 BIOS 级远程控制项目。
Readme GPL-3.0 29 MiB
Languages
Python 54.1%
JavaScript 20.6%
Shell 5.7%
HTML 5.4%
C 4.5%
Other 9.6%