Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"log"
"github.com/chbmuc/lirc"
)
func main() {
// Initialize with path to lirc socket
ir, err := lirc.Init("/var/run/lirc/lircd")
if err != nil {
log.Println(err)
panic(err)
}
// Send Commands
// This worked on a Raspberry Pi 3 Model B with an infra-red LED
// after following the instructions at:
// http://alexba.in/blog/2013/01/06/setting-up-lirc-on-the-raspberrypi/
err = ir.Send("samsung/BN59-00516A POWER")
if err != nil {
log.Println(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.