https://github.com/jurjevic/pixoo64
Go library to control the Divoom Pixoo-64
https://github.com/jurjevic/pixoo64
go golang-library pixoo64
Last synced: 4 months ago
JSON representation
Go library to control the Divoom Pixoo-64
- Host: GitHub
- URL: https://github.com/jurjevic/pixoo64
- Owner: jurjevic
- License: mit
- Created: 2022-11-27T08:51:03.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-05T10:57:49.000Z (over 3 years ago)
- Last Synced: 2025-12-17T14:50:08.505Z (7 months ago)
- Topics: go, golang-library, pixoo64
- Language: Go
- Homepage:
- Size: 167 KB
- Stars: 13
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pixoo-64
Go library to control the Divoom Pixoo-64
__This library is highly work-in-progress...__
### Example:

````go
package main
import (
"github.com/jurjevic/pixoo64"
"golang.org/x/image/draw"
"image/png"
"log"
"net/http"
"net/netip"
)
const address = "192.168.188.62"
func main() {
addr, err := netip.ParseAddr(address)
if err != nil {
log.Fatal("unsupported address", address)
}
device, err := pixoo64.NewDevice(addr)
if err != nil {
log.Fatal("failed to create device for", address)
}
// test images
picture, err := device.Display().CreatePicture()
if err != nil {
log.Fatal("failed to create picture")
}
addFrame(picture, "https://github.com/MariaLetta/free-gophers-pack/raw/master/characters/png/1.png")
addFrame(picture, "https://github.com/MariaLetta/free-gophers-pack/raw/master/characters/png/2.png")
addFrame(picture, "https://github.com/MariaLetta/free-gophers-pack/raw/master/characters/png/3.png")
addFrame(picture, "https://github.com/MariaLetta/free-gophers-pack/raw/master/characters/png/4.png")
addFrame(picture, "https://github.com/MariaLetta/free-gophers-pack/raw/master/characters/png/5.png")
addFrame(picture, "https://github.com/MariaLetta/free-gophers-pack/raw/master/characters/png/6.png")
err = picture.Update()
if err != nil {
log.Fatal("failed to update picture")
}
}
func addFrame(picture *pixoo64.Picture, imageSrc string) {
frame := picture.CreateFrame()
frame.SetSpeed(1000)
// Just a simple GET request to the image URL
// We get back a *Response, and an error
res, err := http.Get(imageSrc)
if err != nil {
log.Fatal("failed to load png", err)
}
defer res.Body.Close()
img, err := png.Decode(res.Body)
if err != nil {
log.Fatal("failed to decode png", err)
}
draw.NearestNeighbor.Scale(frame.Rgba(), frame.Rgba().Bounds(), img, img.Bounds(), draw.Over, nil)
}
````
__Notice:__ Images provided by https://github.com/MariaLetta/free-gophers-pack