Skip to content

c3d2/pentapxlz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pentapxlz

A clojure library to control led-stripes (and other pixels)

Installation

Usage

Start & watch

$ cd pentapxlz
$ lein run

Webapi

## View current state on cmdline (via eventstream + ansi-escape-sequences)
$ curl 'http://localhost:8080/frame?target=ledbeere&streamevery=100&ansicolor=true'

Interact via Repl

$ cd pentapxlz
$ lein repl
> (-main)
> (pentapxlz.process.util.registry/ls-started)
> (pentapxlz.process.util.registry/stop-all!)
> (pprint (pentapxlz.process.util.registry/ls))
> (pentapxlz.process.util.registry/start! :renderer/ledbeere-frame)

;; set some pixels
(set-simple! :state/ledbeere-frame [:green :blue])
(set-simple! :state/ledbeere-frame (cycle (segments [[1 :red] [10 :yellow]])))

;; using frame-generators
(set-simple! :state/ledbeere-frame (resolve-generator {:type :generator/cycled
							   :chain [:generator/segments]
						   :nr+colors [[1 :blue] [10 :yellow]]}))

;; Read documentation and sources & try it yourself
> (source pentapxlz.core/-main)

About

A clojure library to control led-stripes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published