This library allows a Go client to communicate with an AnimatedLEDStrip server.
The library can be downloaded with:
go get github.com/AnimatedLEDStrip/client-go
To create a HTTP client, run ALSHttpClient(ipAddress)
.
import als "github.com/AnimatedLEDStrip/client-go"
client := als.ALSHttpClient("10.0.0.254")
This library follows the conventions laid out for AnimatedLEDStrip client libraries, with the following modifications:
- Function names and struct variables are capitalized because of how Go denotes exported identifiers
DegreesRotation
andRadiansRotation
are constructors for therotation
struct, which uses theRotationType
variable to track which type it isAbsoluteDistance
andPercentDistance
are constructors for thedistance
struct, which uses theDistanceType
variable to track which type it isColorContainer
andPreparedColorContainer
have aContainerType
variable that works similarly to above, though the structs are different- The
colors
parameter for anAnimationToRunParams
struct only acceptsColorContainer
s - The
default
parameter for anAnimationParameter
hasn't been figured out yet