[Solved] invalid conversion from 'unsigned char*' to 'unsigned char'

This should be an easy question for someone who knows:

How do I get rid of the error message:

error: invalid conversion from 'unsigned char*' to 'unsigned char'

I'm not intentionally creating a pointer, and only defined the array as "unsigned" because this error message called the other side "unsigned" already.

unsigned char buff8[8][512];
byte buffISR=0;
int sampCnt = 0;

void setup()
{
  PORTC = buff8[buffISR,sampCnt];
}

void loop()
{
}

You shouldn't use the comma in this case:

  PORTC = buff8[buffISR][sampCnt];
1 Like

econjack:
You shouldn't use the comma ... buff8[buffISR][sampCnt];

Absolutely right. That fixed it!

So simple; but something I never would have guessed.