I was just wondering if you could see anything wrong with this code off had that wouldn't make it work
char mid_store[6];
char output[512];
unsigned char sample[16][9];
int j;
int i;
int str_length = 0;
for(j = 0; j<9; j++)
{
for(j = 0; j<16; j++)
{
sample[j] = read_adc(0);
itoa(sample[j], mid_store);
strcpy(output, mid_store);
strcpy(output, ',');
}
for(i = 0; i < 16; i++)
{
if(sample[j]<10)
{str_length = str_length + 3;}
else if(sample[j]<100&&sample[j]>9)
{str_length = str_length + 4;}
else
{str_length = str_length + 5;}
}
}
printf("W 1 %d\r", str_length);
printf("%s", output);
char mid_store[6];
char output[512];
unsigned char sample[16][9];
int j;
int i;
int str_length = 0;
for(j = 0; j<9; j++)
{
for(j = 0; j<16; j++)
{
sample[j] = read_adc(0);
itoa(sample[j], mid_store);
strcpy(output, mid_store);
strcpy(output, ',');
}
for(i = 0; i < 16; i++)
{
if(sample[j]<10)
{str_length = str_length + 3;}
else if(sample[j]<100&&sample[j]>9)
{str_length = str_length + 4;}
else
{str_length = str_length + 5;}
}
}
printf("W 1 %d\r", str_length);
printf("%s", output);