Little Robot Friends
Arduino Library Reference  version 1.1
LRFPattern Union Reference

Detailed Description

Pattern data structures are wrapped in this union datatype to allow for easy access to the raw data contained therein. Patterns can be created using the same method as creating a LRFPatternStruct. For example:

LRFPattern myPattern = { LRFColor_Red, LRFColor_Green, LRFPatternMode_Fade };

Is the same as...

LRFPatternStruct myPattern = { LRFColor_Red, LRFColor_Green, LRFPatternMode_Fade };

However, with our union type I can also access the raw integer value of that pattern.

Serial.print(myPattern.raw,BIN);                // prints the integer value in binary format
myPattern.raw = pgm_read_word(&mySavedPattern); // loads pattern data from program memory

For more information on how patterns work, check out the documentation for LRFPatternStruct.

Definition at line 156 of file LRFUtils.h.

#include <LRFUtils.h>


The documentation for this union was generated from the following file: