How to read unsigned char array from serial port?


i have used such as,9);

where response is an unsigned char array[9] variable

it gives error as

no matching function for call to ‘USARTSerial::read(unsigned char [9], int)’

can anybody help me


USARTSerial class inherits from Stream and hence you should find something there


i think it is readBytes() in stream

but how to declare stream class variable?


Serial4 (as pointed out) is an instance inheriting from Stream class…

Serial4.readBytes(myBuffer, size);


thank u i got it