https://github.com/marinx/droneservo
A drone hardware fun plugin :)
https://github.com/marinx/droneservo
drone-ci droneio golang raspberry-pi
Last synced: 4 months ago
JSON representation
A drone hardware fun plugin :)
- Host: GitHub
- URL: https://github.com/marinx/droneservo
- Owner: MarinX
- License: other
- Created: 2022-09-01T08:49:50.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-01T08:51:24.000Z (almost 3 years ago)
- Last Synced: 2024-12-28T05:26:54.065Z (5 months ago)
- Topics: drone-ci, droneio, golang, raspberry-pi
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
A webhook extension for fun project using gobot, rpi and servo motor . _Please note this project requires Drone server version 1.4 or higher._
## Demo
https://user-images.githubusercontent.com/3714132/187873496-79807991-04db-4faa-81fd-7d639ba99be6.mp4
## Installation
Create a shared secret:
```console
$ openssl rand -hex 16
bea26a2221fd8090ea38720fc445eca6
```Download and run the plugin:
```console
$ go build
$ ./piservo
```Set env variables (it's best first to check the angles using cli tool)
```sh
// set GPIO pin where servo motor is located on rpi
export DRONE_GPIO_PIN=17
// set the angle when the build is not running (default state)
export DRONE_SERVO_ANGLE_NONE=22
// set the angle when the build is running
export DRONE_SERVO_ANGLE_RUN=33
// set the angle when build is failed
export DRONE_SERVO_ANGLE_FAIL=45
// set the angle when build is success
export DRONE_SERVO_ANGLE_PASS=60```
Update your Drone server configuration to include the plugin address and the shared secret.
```text
DRONE_WEBHOOK_ENDPOINT=http://1.2.3.4:3000
DRONE_WEBHOOK_SECRET=bea26a2221fd8090ea38720fc445eca6
```## License
This software is licensed under the [Blue Oak Model License 1.0.0](https://spdx.org/licenses/BlueOak-1.0.0.html).