Hi there!
I’m working on porting an Andruino code, and I need some help.
My ported code doesn’t compiles right now with the error:
invalid conversion from 'uint8_t (aka unsigned char) to ‘char*’**
The error is apparently caused by:
Serial1.readBytes(_rx_buffer, frameSize);
The Buffer is defined:
uint8_t _rx_buffer[BUFFER_SIZE];
What puzzles me, is that Arduino and Photon uses the same definition for readBytes:
size_t readBytes( char *buffer, size_t length); // read chars from stream into buffer
and the Arduino documentation about readBytes says:
Parameters
buffer: the buffer to store the bytes in (char[] or byte[])
So, in theory is possible to use both char or byte, and then, the buffer array is OK.
Obviously the code works perfectly on Arduino.
I always appreciate any help.
Best!