1

I'm working with a DUE. The call Serial.readStringUntil() doesn't work.

This is the error message I get when I compile: no matching function for call to 'UARTClass::readStringUntil()'

Is it possibly a library issue? The only library I'm loading: #include <Arduino.h>

Any assistance would be appreciated!

Here is the original code:

void loop() 
{
  String LazCommand;
  
  if(Serial.available())
    {
        LazCommand = Serial.readStringUntil();
        Serial.print("Command received \n" && LazCommand);
    }
  
  interrupts(); 
  delay(1000); 
  noInterrupts(); 
}
6
  • To be clear, you have read this and are confused as to why you're getting this error message? – timemage Jan 5 at 3:54
  • Right, so when you read that you saw terminator: the character to search for right? If you saw that part, and it didn't make sense to you, then maybe that is something you can form a question around. I'll volunteer this much: it's not a library issue and it has nothing to do with the Due. – timemage Jan 5 at 5:06
  • I notice your comment with the code has disappeared, if that becomes relevant again it's better that it goes directly into the question. If you came to the realization that your answer right there in the documentation, no big deal. We close the question out. If the stuff about the terminator really doesn't make sense to you, can edit your question to ask specifically about that and someone, perhaps me, will give a proper answer to it. – timemage Jan 5 at 5:20
  • I figured it out thanks to your input. Yes it is relevant, I removed it trying to format the code section. So I put it back in the question, still doesn't look right (format). I walked myself into a mess trying to resolve the issue which in the beginning was the terminator I put in was "\n" when it should have been '\n'. Sometimes the trees block the view of the forest.... I – Ken Jan 5 at 5:26
  • Okay. The question will probably get closed. You should know that && doesn't do what you think it does. Your code will very likely lock up if you turn the interrupts off. – timemage Jan 5 at 5:38