char* lastfeedbuffer[3];
void lastfeed_receive(){
while(Serial.available() >= LASTFEED_LEN ){
char c = Serial.read();
if (c == LASTFEED_HEAD){
for (int i = 0; i < LASTFEED_LEN - 1; i++){
lastfeedbuffer[i] = Serial.read();
}
}
}
Serial.println(lastfeedbuffer);
if (lastfeedbuffer == "00"){
Serial.println("asdf");
}
}
I don't understand why the following code is not printing the asdf. the Serial.println(lastfeedbuffer) prints 00, which means it should go into the loop any ideas why it doesn't?
lastfeedbufferand"00"are not of compatible types: the first is of typearray of 3 pointer to char; the second is of typearray of char. Increase the warning level of your compiler and MIND THE WARNINGS.