2018-10-09

Arduino Function

void setup() {
  Serial.begin(9600);
}

void loop() {
  byte cData[18];
  byte  cLen;
  QFunction(cData, &cLen);
  for(int i=0; i<cLen;i++) {
  Serial.println(cData[i]);
  }
  Serial.println("");
  delay(1000);        
}

void QFunction(byte *data, byte *len) {
  byte mLen = 10;
  for(int i=0; i< mLen; i++) {
    data[i] = (byte) i+5;
  }
  *len = mLen;
}

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *