Skip to content

Missing Serial.write(const char*) in HardwareSerial.h? #55

Closed
@minyk

Description

@minyk

Hi,

Freematics's ArduinoOBD library uses Serial.write(const char*), but with Arduino-ESP32, it dose not complie with below error:

/Users/minyk/Documents/Arduino/libraries/OBDI2C/src/OBD.cpp: In member function 'virtual void COBD::write(const char*)':
/Users/minyk/Documents/Arduino/libraries/OBDI2C/src/OBD.cpp:112:17: error: call of overloaded 'write(const char*&)' is ambiguous
  OBDUART.write(s);

So I dug the original Arduino Core code up, then found this line from HardwareSerial.h:

    using Print::write; // pull in write(str) and write(buf, size) from Print

Arduino-ESP32's HardwareSerial.h does not have that part of code. Is this on purpose?

Thank you.

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