adStringUntil() | Referencia Del Lenguaje Arduino

  • TUTORIALS
  • HARDWARE & TOOLS
  • REFERENCES
  • FAQs
  • ABOUT US
Home References Language References
  • English
  • |
  • Deutsch
  • |
  • Português
  • |
  • 한국어
  • |
  • Español

Control Structure

  • break
  • continue
  • do while
  • if else
  • for
  • goto
  • if
  • return
  • switch case
  • while

Further Syntax

  • /* */ block comment
  • {} curly braces
  • #define
  • #include
  • ; semicolon
  • // single line comment

Data Types

  • array
  • bool
  • boolean
  • byte
  • char
  • double
  • float
  • int
  • long
  • short
  • string
  • String()
  • unsigned char
  • unsigned int
  • unsigned long
  • word

Constants

  • Constants
  • Floating Point Constants
  • Constantes enteras

Variable Scope & Qualifiers

  • const
  • Alcance de las variables
  • static
  • volatile

Digital IO

  • digitalRead()
  • digitalWrite()
  • pinMode()

Analog IO

  • analogRead()
  • analogReference()
  • analogWrite()

Advanced IO

  • noTone()
  • pulseIn()
  • shiftIn()
  • shiftOut()
  • tone()

Serial

  • Serial
  • Serial.available()
  • Serial.availableForWrite()
  • Serial.begin()
  • Serial.end()
  • Serial.find()
  • Serial.findUntil()
  • Serial.flush()
  • if(Serial)
  • Serial.parseFloat()
  • Serial.parseInt()
  • Serial.peek()
  • Serial.print()
  • Serial.println()
  • Serial.read()
  • Serial.readBytes()
  • Serial.readBytesUntil()
  • Serial.readString()
  • Serial.readStringUntil()
  • serialEvent()
  • Serial.setTimeout()
  • Serial.write()

Stream

  • Stream

Keyboard

  • Keyboard
  • Keyboard.begin()
  • Keyboard.end()
  • Keyboard Modifiers
  • Keyboard.press()
  • Keyboard.print()
  • Keyboard.println()
  • Keyboard.release()
  • Keyboard.releaseAll()
  • Keyboard.write()

Mouse

  • Mouse
  • Mouse.begin()
  • Mouse.click()
  • Mouse.end()
  • Mouse.isPressed()
  • Mouse.move()
  • Mouse.press()
  • Mouse.release()

Time

  • delay()
  • delayMicroseconds()
  • micros()
  • millis()

Math

  • abs()
  • constrain()
  • map()
  • max()
  • min()
  • pow()
  • sqrt()

Characters

  • isAlpha()
  • isAlphaNumeric()
  • isAscii()
  • isControl()
  • isDigit()
  • isGraph()
  • isHexadecimalDigit()
  • isLowerCase()
  • isPrintable()
  • isPunct()
  • isSpace()
  • isUpperCase()
  • isWhitespace()

Bits and Bytes

  • bit()
  • bitClear()
  • bitRead()
  • bitSet()
  • bitWrite()
  • highByte()
  • lowByte()

Arithmetic Operators

  • + Adición
  • = operador de asignación
  • / División
  • * Multiplicación
  • % Módulo
  • - Subtracción

Bitwise Operators

  • << Desplazamiento de bit a la izquierda
  • >> Desplazamiento de bit a la derecha
  • & AND bit a bit
  • | OR bit a bit
  • ^ XOR bit a bit

Boolean Operators

  • && (AND lógico)
  • ! (NOT lógico)
  • || (OR lógico)

Compound Operators

  • += (Suma compuesta)
  • |= OR bit a bit compuesto
  • /= (División compuesta)
  • *= (Multiplicación compuesta)
  • %= (Módulo compuesto)
  • -= (Resta compuesta)
  • -- (decremento)
  • ++ (incremento)

Conversion

  • byte()
  • char()
  • float()
  • int()
  • long()
  • word()

Random Numbers

  • random()
  • randomSeed()

Trigonometry

  • cos()
  • sin()
  • tan()

External Interrupts

  • attachInterrupt()
  • detachInterrupt()

Interrupts

  • interrupts()
  • noInterrupts()

Utilities

  • PROGMEM
  • sizeof()

Pointer Access Operators

  • * Dereference Operator
  • & Reference Operator

Zero, Due, MKR Family

  • analogReadResolution()
  • analogWriteResolution()
Serial.readStringUntil()

Descripción

Serial.readStringUntil() lee los caracteres del buffer serie en una cadena. La función termina si se detecta el carácter terminador o el tiempo de espera se ha alcanzado (ver setTimeout()).

Esta función es parte de la clase Stream, y es llamada por cualquier clase que herede de ella (Wire, Serial, etc.). Ver la página principal de la claseStream para obtener más información.

Sintaxis

Serial.readStringUntil(delimiter)

Parámetros

  • delimiter: el caracter a buscar (char)

Retornos

  • La cadena completa leída del buffer serie, hasta que se detecte el carácter terminador.

Ejemplo

void setup() { Serial.begin(9600); // opens serial port, sets data rate to 9600 bps } void loop() { // check if data is available if (Serial.available() > 0) { // read the incoming string: String incomingString = Serial.readStringUntil('\n'); // prints the received data Serial.print("I received: "); Serial.println(incomingString); } }
  • Select Newline at the ending selection of Serial Monitor
  • Type "HELLO" on Serial Monitor
  • Click Send button:
COM6 Send Autoscroll Show timestamp Clear output 9600 baud   Newline  
  • The result on Serial Monitor:
COM6 Send I received: HELLO Autoscroll Show timestamp Clear output 9600 baud   Newline  

ARDUINO BUY RECOMMENDATION

Arduino UNO R3
Arduino Starter Kit
Disclosure: Some links in this section are Amazon affiliate links. If you make a purchase through these links, we may earn a commission at no extra cost to you.Additionally, some links direct to products from our own brand, DIYables .

※ OUR MESSAGES

  • We are AVAILABLE for HIRE. See how to hire us to build your project
PREVIOUS NEXT DISCLOSURE ArduinoGetStarted.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com, Amazon.it, Amazon.fr, Amazon.co.uk, Amazon.ca, Amazon.de, Amazon.es, Amazon.nl, Amazon.pl and Amazon.se The Arduino Reference text is licensed under a Creative Commons Attribution-Share Alike 3.0 License. The content is modified based on Official Arduino References by: adding more example codes and output, adding more notes and warning, rewriting some parts, and re-formating Email: [email protected] ×

Tag » Arduino Serial.readstringuntil(' N')