#pragma once

#include "Arduino.h"

#define MSGLEN   10

class c_message
{
  uint8_t _buffer[MSGLEN];
  uint8_t _bufIndex = 0;
  bool validheader;
public:
  c_message();

  void addByte(uint8_t byte)
  {
    _buffer[_bufIndex++] = byte;
    if(_bufIndex >= MSGLEN)
    {
      _bufIndex = 0;
    }
    
  }

};

void initI2C( void);
void handleI2C ( void );
