This library allows a Go client to communicate with an AnimatedLEDStrip server.
The library can be downloaded with:
go get github.com/AnimatedLEDStrip/client-goTo 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
- DegreesRotationand- RadiansRotationare constructors for the- rotationstruct, which uses the- RotationTypevariable to track which type it is
- AbsoluteDistanceand- PercentDistanceare constructors for the- distancestruct, which uses the- DistanceTypevariable to track which type it is
- ColorContainerand- PreparedColorContainerhave a- ContainerTypevariable that works similarly to above, though the structs are different
- The colorsparameter for anAnimationToRunParamsstruct only acceptsColorContainers
- The defaultparameter for anAnimationParameterhasn't been figured out yet