1 #ifndef MagicPanelI2C_h 
    2 #define MagicPanelI2C_h 
   20         fI2CAddress(i2cAddress)
 
   29         if (cmd[0] == 
'M' && cmd[1] == 
'P')
 
   32             Wire.beginTransmission(fI2CAddress);
 
   33             for (
size_t len = strlen(cmd); len-- > 0; cmd++)
 
   35             Wire.endTransmission();  
 
   57         fI2CAddress(i2cAddress)
 
   61     void on(
byte numSeconds = 0)
 
   66                 sendCommand(kPanelOn);
 
   69                 sendCommand(kPanelOn2S);
 
   72                 sendCommand(kPanelOn5S);
 
   75                 sendCommand(kPanelOn10S);
 
   82         sendCommand(kPanelOff);
 
   87         sendCommand(kPanelRandom6S);
 
  101         kPanelTraceUpType1 = 8,
 
  102         kPanelTraceUpType2 = 9,
 
  103         kPanelTraceDownType1 = 10,
 
  104         kPanelTraceDownType2 = 11,
 
  105         kPanelTraceRightType1 = 12,
 
  106         kPanelTraceRightType2 = 13,
 
  107         kPanelTraceLeftType1 = 14,
 
  108         kPanelTraceLeftType2 = 15,
 
  109         kPanelExpandType1 = 16,
 
  110         kPanelExpandType2 = 17,
 
  111         kPanelCompressType1 = 18,
 
  112         kPanelCompressType2 = 19,
 
  114         kPanelCyclonColumn = 21,
 
  115         kPanelCyclonRow = 22,
 
  124         kPanelTestSequenceType1 = 31,
 
  125         kPanelTestSequenceType2 = 32,
 
  128         kPanelQuadrantType1 = 35,
 
  129         kPanelQuadrantType2 = 36,
 
  130         kPanelQuadrantType3 = 37,
 
  131         kPanelQuadrantType4 = 38,
 
  135     void sendCommand(
int cmd)
 
  137         Wire.beginTransmission(fI2CAddress); 
 
  139         Wire.endTransmission();