Description Prints data to the serial port as human-readable ASCII text. This command can take many forms. Numbers are printed using an ASCII character for each digit. Floats are similarly printed as ASCII digits, defaulting to two decimal places. Bytes are sent as a single character. Characters and strings are sent as is. For example: […]
Description Returns the next byte (character) of incoming serial data without removing it from the internal serial buffer. That is, successive calls to peek() will return the same character, as will the next call to read(). peek() inherits from the Stream utility class. Syntax All boards: Serial.peek() Serial1.peek() 86Duino One specific: Serial2.peek() Serial3.peek() Serial485.peek() 86Duino […]
Description Looks for the next valid integer in the incoming serial stream. parseInt() inherits from the Stream utility class. If no valid integer is found within one second (adjustable through Serial.setTimeout() ) a default value of 0 will be returned. Syntax All boards: Serial.parseInt() Serial1.parseInt() 86Duino One specific: Serial2.parseInt() Serial3.parseInt() Serial485.parseInt() 86Duino EduCake specific: Serial2.parseInt() […]
Description Serial.parseFloat() returns the first valid floating point number from the Serial buffer. Characters that are not digits (or the minus sign) are skipped. parseFloat() is terminated by the first character that is not a floating point number. Serial.parseFloat() inherits from the Stream utility class. Syntax Serial.parseFloat() Parameters none Returns float See also - Stream […]
Description Waits for the transmission of outgoing serial data to complete. flush() inherits from the Stream utility class. Syntax All boards: Serial.flush() Serial1.flush() 86Duino One specific: Serial2.flush() Serial3.flush() Serial485.flush() 86Duino EduCake specific: Serial2.flush() Serial3.flush() Serial232.flush() Parameters none Returns nothing See also - Serial - available() - begin() - end() - find() - findUntil() - parseFloat() […]
Description Serial.findUntil() reads data from the serial buffer until a target string of given length or terminator string is found. The function returns true if the target string is found, false if it times out. Serial.findUntil() inherits from the Stream utility class. Syntax Serial.findUntil(target, terminal) Parameters target : the string to search for (char string) […]
Description Serial.find() reads data from the serial buffer until the target string of given length is found. The function returns true if target string is found, false if it times out. Serial.find() inherits from the Stream utility class. Syntax Serial.find(target) Parameters target : the string to search for (char string) Returns boolean See also - […]
Description Disables serial communication, allowing the RX and TX pins to be used for general input and output. To re-enable serial communication, call Serial.begin(). Syntax All boards: Serial.end() Serial1.end() 86Duino One/EduCake specific: Serial2.end() Serial3.end() Parameters none Returns nothing See also - Serial - available() - begin() - find() - findUntil() - flush() - parseFloat() - […]
Description Sets the data rate in bits per second (baud) for serial data transmission. For communicating with the computer, use one of these rates: 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, or 115200. You can, however, specify other rates – for example, to communicate over pins 0 and 1 with a […]
Description Get the number of bytes (characters) available for reading from the serial port. This is data that’s already arrived and stored in the serial receive buffer (which holds 4096 bytes). available() inherits from the Stream utility class. Syntax All boards: Serial.available() Serial1.available() 86Duino One specific: Serial2.available() Serial3.available() Serial485.available() 86Duino EduCake specific: Serial2.available() Serial3.available() Serial232.available() […]