Patterns | LRFPattern
The LRFPattern data type is a collection of properties that represent a pattern of eye animations in the Little Robot Friends library. LRFPatterns consist of four properties: colorA is the initial color selection. colorB is the second color selection. transform sets the behavior of the LEDs and how their colors transition. duration represents the amount of time taken to complete the animation pattern.
Examples
Long-form
LRFPattern myPattern = {
.colorA = LRFColor_Red,
.colorB = LRFColor_Blue,
.transform = LRFTransform_ZigZag,
.duration = LRFDuration_Long
};
Short-form
LRFPattern myOtherPattern = { LRFColor_Green, LRFColor_Purple, LRFTransform_Boomerang, LRFDuration_DoubleLong };
Syntax
LRFPattern pattern = {
.colorA = ,
.colorB = ,
.transform = ,
.duration =
}
Parameters
colorA: LRFColor type - The musical note of the sound.colorB: LRFColor type - The octave that the note is played in.transform: LRFTransform type - The intonation of the sound made.duration: LRFDuration type - The duration of the sound made.