Expecting the slave to ACKnowledge and return data, but it does not. This is my protocol. This is my Datasheet
The datasheet mentions \"The slave will answer by sending
Your program has undefined behaviour. You have declared buffer
as:
char buffer[1];
That's an array of one single character. The only null-terminated string you can possibly store there is empty string (i.e. where buffer[0] == '\0'
). But you are using it to convert integers to strings.
You need to make the buffer large enough to hold the largest string you expect to store in it, including the terminator.