Created
March 23, 2017 04:32
-
-
Save SeeJayDee/6ad631eee1d6276db1b5d0280e584799 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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