includes go-rpi-rgb-led-matrix as a dep

This commit is contained in:
2023-12-21 11:06:27 -05:00
parent d1d6e2d9f9
commit 4dcea50309
187 changed files with 1174372 additions and 0 deletions
@@ -0,0 +1,39 @@
package main
import (
"flag"
"os"
"time"
"github.com/RockKeeper/go-rpi-rgb-led-matrix"
"github.com/RockKeeper/go-rpi-rgb-led-matrix/rpc"
)
var (
img = flag.String("image", "", "image path")
)
func main() {
f, err := os.Open(*img)
fatal(err)
m, err := rpc.NewClient("tcp", "10.20.20.20:1234")
fatal(err)
tk := rgbmatrix.NewToolKit(m)
close, err := tk.PlayGIF(f)
fatal(err)
time.Sleep(time.Second * 3)
close <- true
}
func init() {
flag.Parse()
}
func fatal(err error) {
if err != nil {
panic(err)
}
}