Binozo / cec.go

cec.go - a golang binding for libcec

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cec.go - a golang binding for libcec

cec.go is a Go interface to LibCEC.

Install

Make sure you have libcec and it's header files installed (apt-get install libcec-dev)

go get github.com/chbmuc/cec

Getting Started

A simple example to turn on the TV:

package main

import (
	"fmt"
	"github.com/chbmuc/cec"
)

func main() {
	c, err := cec.Open("", "cec.go", true)
	if err != nil {
		fmt.Println(err)
	}
	c.PowerOn(0)
}

About

cec.go - a golang binding for libcec

License:MIT License


Languages

Language:Go 100.0%