Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fishwaldo/go-dcdc200
Golang Package for mini-box dcdc-usb power supply
https://github.com/fishwaldo/go-dcdc200
Last synced: about 20 hours ago
JSON representation
Golang Package for mini-box dcdc-usb power supply
- Host: GitHub
- URL: https://github.com/fishwaldo/go-dcdc200
- Owner: Fishwaldo
- License: mit
- Created: 2021-09-21T14:21:17.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-05T13:11:24.000Z (over 1 year ago)
- Last Synced: 2024-06-21T04:27:46.790Z (3 months ago)
- Language: Go
- Size: 54.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# Go-LogAdapter
[![codecov](https://codecov.io/gh/Fishwaldo/go-dcdc200/branch/master/graph/badge.svg)](https://codecov.io/gh/Fishwaldo/go-dcdc200)
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/github.com/Fishwaldo/go-dcdc200)Package go-dcdcusb interfaces with the DCDCUSB power supply from mini-box ([https://www.mini-box.com/DCDC-USB](https://www.mini-box.com/DCDC-USB))
via USB port and allows you to retrive the status of the power supplyit depends upon GoUSB which in turn depends upon the libusb C library, thus CGO is required for this module
## Please see the GoUSB pages for hints on compiling for platforms other than linux
Building
Compile with the tag nogousb to disable compiling with USB Support. Then the only option available
is a Simulator Mode that replays a previously captured session.## Sub Packages
* [cmd](./cmd)
## Examples
```golang
dc := dcdcusb.DcDcUSB{}
logsink := log.New(os.Stdout, "", 0)
log := stdr.New(logsink)dc.Init(log, false)
if ok, err := dc.Scan(); !ok {
log.Error(err, "Scan Failed")
return
}
defer dc.Close()
for i := 0; i < 100; i++ {
ctx, cancel := context.WithTimeout(context.Background(), (1 * time.Second))
dc.GetAllParam(ctx)
cancel()
time.Sleep(1 * time.Second)
}
dc.Close()```
---
Readme created from Go doc with [goreadme](https://github.com/posener/goreadme)