Serial.readbytesuntil()

Status
Not open for further replies.

Thread Starter

bhuvanesh

Joined Aug 10, 2013
268
Rich (BB code):
void setup()
{
  Serial.begin(9600);
}
void loop()
{char a[10];

  if(Serial.available())
  {
    byte b=Serial.readBytesUntil(b,a,10  );
    Serial.println(b);
  }
}
this is an arduino code

here terminator string is b
input:adb
actuall output:3

but expected out put is 2.how could it include terminator character as it made to terminate..help me
 

Georacer

Joined Nov 25, 2009
5,182
Breaking a problem to very small pieces doesn't really help. Resume the discussion over your whole project in this thread so that people can have a complete idea of what you are trying to do.

Do not create any more new threads on this project.
 
Status
Not open for further replies.
Top