pipwm

command module
v0.0.0-...-45ff573 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2022 License: MIT Imports: 5 Imported by: 0

README

pipwm

The pipwm is command line utility for controlling hardware PWM0 pin (18) on raspberry At this first this is used only as test tool for my other hardware project This is also good example how to use https://github.com/hjkoskel/govattu library on go

Compiling

GOARCH=arm GOOS=linux go build

should cross compile source code to raspberry binary

Usage

Due the limitations of govattu, this program have to be run as root. I am working on that bug when it starts annoying too much

sudo ./pipwm -h

prints out commands. The verbose option "-v" allows to see how bad the quantization error is.

Examples

Controlling servo to zero, min and max

sudo ./pipwm -v -sa 0
sudo ./pipwm -v -sa -90
sudo ./pipwm -v -sa 90

Options -sc sets center, -ss and swing.. and -tr length of period. By default servo mode uses 20000

Specify pulses with lo and hi times

sudo ./pipwm -lo 80000 -hi 50000 -v

Calculate by using hi time and percent

sudo ./pipwm -hi 9000 -p 5 -v

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pulseGadget module
pulsegenui module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL