https://github.com/trinitronx/test-cec
Simple demo code for using & testing out libcec Golang bindings
https://github.com/trinitronx/test-cec
Last synced: about 10 hours ago
JSON representation
Simple demo code for using & testing out libcec Golang bindings
- Host: GitHub
- URL: https://github.com/trinitronx/test-cec
- Owner: trinitronx
- License: mit
- Created: 2018-01-15T20:55:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T21:21:44.000Z (over 8 years ago)
- Last Synced: 2025-01-10T07:46:52.757Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
test-cec.go
===========
Simple demo code for using & testing out `github.com/chbmuc/libcec`.
> [!NOTE]
> Outdated / unmaintained dependencies!
>
> `github.com/chbmuc/libcec` only supports `libcec` version `4.x`!
> As such, this project will not work on most modern Linux distros.
> The instructions were originally tested for Ubuntu `16.04`, Go `1.7.4`
Building
========
First, make sure you have [`golang` installed][install-golang]
Next, install dependencies:
sudo apt-get -y install build-essential git libcec-dev libp8-platform-dev libudev-dev
Optionally, you may wish to install `cec-client` for comparing how it interacts with CEC:
sudo apt-get -y install cec-utils
Make sure you have [`GOPATH` set up][setup-gopath] somewhere where you would like to [organize your go code][how-to-write-go]. Then:
go get github.com/chbmuc/cec
go get github.com/trinitronx/test-cec
cd $(go env GOPATH)/src/github.com/trinitronx/test-cec
go install
Running
=======
It's as simple as:
$(go env GOPATH)/bin/test-cec
[install-golang]: https://github.com/golang/go/wiki/Ubuntu
[setup-gopath]: https://github.com/golang/go/wiki/SettingGOPATH
[how-to-write-go]: https://golang.org/doc/code.html