I'm fairly new to Arduino and I'm just a hobby-coder, not a professional by a long shot. I'm working on my first bigger project and I have written a bunch of convenience functions to control eDIPTFT-series intelligent displays from Electronic Assembly. With the help of the forum, I now converted this collections of functions in a .ino file into a libray.

Now, my problem. Those displays use serial communication and I want to hand over the serial port to use for communications in a parameter in the constructor:

Trouble is, I can't get it compiled. The sketch I'm writing in my main project includes the FastSerial library which is needed by some other libraries I also use. Now, when I try to compile my sketch with my EDIPTFT library, I get these errors:

The problem is solved meanwhile . I had to remove the inclusion of Arduino.h and additionally include FastSerial.h in my library's .cpp-file. As I understood it, the appeareance of Serial<x>.write() in my lib caused Arduino to automatically include the "wrong" hardwareserial code which collided with the FastSerial lib which is included by the sketch.

datainBuffer() returns the number of characters which are in the output buffer, ready to be pulled. readBuffer() reads the output buffer. Smartprotocol is implemented in those too, when selected on init.

It SHOULD work. But you have to remove the FastSerial include from the library too then. However, I'd recommend FastSerial because you can define the buffer size of the read buffer up to 256 bytes and thus are less likely to miss any message from the display. I'd also recommend 115k2. The display is not much fun on slower rates .