 
 void streamAddCmd(char *buffer)
 {
-  int start = streamCmdArray[0]*STREAM_LENGTH+5;
+  int start = ((int)streamCmdArray[0]*STREAM_LENGTH)+5;
   for (int i=0;i<5;i++)
     streamCmdArray[start+i]=buffer[i];
   streamCmdArray[0]++;

  char* sendNull = {0x00};
  sendData[0]=regAddress;
  lwi2c.i2c_start();
  /*if (!lwi2c.get_last_error())
    return sendNull;*/
  lwi2c.i2c_write(devAddress,1,(char*)sendData);
  /*if (!lwi2c.get_last_error())
    return sendNull;*/
  lwi2c.i2c_repeated_start();
  /*if (!lwi2c.get_last_error())
    return sendNull;*/
  char* receiveBuffer = lwi2c.i2c_read(devAddress,length);
  /*if (!lwi2c.get_last_error())
    return sendNull;*/
  lwi2c.i2c_stop();
  
  if (0x00 != lwi2c.get_last_error())

*/
void heartBeat()
{
  Serial.write(CMD_STREAM_START);
  Serial.write(streamCmdArray[1]+4+2);
  
