Skip to content

Serial.flush() Outdated #4

@santaimpersonator

Description

@santaimpersonator

Several customer have reported that the Serial.flush() function no longer clears the input and output buffers; it only clears the output buffer.

The firmware needs to be updated for this change:
https://github.com/sparkfun/OBD-II_UART/blob/master/Firmware/obdIIUartQuickstart.ino#L55
https://github.com/sparkfun/OBD-II_UART/blob/master/Firmware/obdIIUartQuickstart.ino#L60
https://github.com/sparkfun/OBD-II_UART/blob/master/Firmware/obdIIUartQuickstart.ino#L83

A common recomendation from the Arduino forum:

while(Serial.available() > 0) {
  char dump_buf = Serial.read();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions