aboutsummaryrefslogtreecommitdiff
path: root/unicorn
diff options
context:
space:
mode:
authorMartin Ashby <martin@martin-laptop.lan>2018-05-21 10:34:11 +0100
committerMartin Ashby <martin@martin-laptop.lan>2018-05-21 10:34:11 +0100
commit5d0a236854dcef596f608c2b7b2dd6197af0efb6 (patch)
treed6b533641fc2827dfa0112e6dc53dfbb75562ade /unicorn
parent7213657a539c86dccef9446c373ba8a1ba386c20 (diff)
parentc0e52f380c0a06ccd87630ea4231c66b5976fe01 (diff)
downloadunicornpaint-5d0a236854dcef596f608c2b7b2dd6197af0efb6.tar.gz
unicornpaint-5d0a236854dcef596f608c2b7b2dd6197af0efb6.tar.bz2
unicornpaint-5d0a236854dcef596f608c2b7b2dd6197af0efb6.tar.xz
unicornpaint-5d0a236854dcef596f608c2b7b2dd6197af0efb6.zip
Merge branch 'master' of github.com:MFAshby/unicornpaint
Diffstat (limited to 'unicorn')
-rw-r--r--unicorn/README.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/unicorn/README.md b/unicorn/README.md
new file mode 100644
index 0000000..9e3d13a
--- /dev/null
+++ b/unicorn/README.md
@@ -0,0 +1,24 @@
+A go library for interacting with Raspberry Pi Unicorn HAT HD, with a similar API to the official library https://github.com/pimoroni/unicorn-hat-hd
+
+Includes a simulator when running on amd64 and 386 linux PCs.
+
+Sample usage:
+```
+package main
+
+import "github.com/MFAshby/unicornpaint/unicorn"
+
+func main() {
+ uni, _ := unicorn.GetUnicorn()
+ defer func() { uni.Off() }()
+ var x, r, y, g, b uint8
+ x = 10
+ y = 10
+ r = 255
+ g = 255
+ b = 255
+ uni.SetPixel(x, y, r, g, b)
+ uni.Show()
+ uni.MainLoop()
+}
+```