Go Down

Topic: Wire.h header problem with object and inhereted functions (Read 206 times) previous topic - next topic

kyrpav

I am using the Wire.cpp library and if you open the file you will see at the end.This line

   
Code: [Select]
extern TwoWire Wire;

The lib is by default inside Arduino IDE at the examples. I am using Eclipse. I get an error that a method must be implemented.

> Description Resource Path Location Type The type 'TwoWire' must
> implement the inherited pure virtual method 'Print::write' Wire.h
> /ArduinoCore/src line 76 Code Analysis Problem

I do not know how to implement it. What should this function do? should just open and close brackets?

So i understand the problem but how can write in the function at its implementation?

PaulS

You should try compiling and linking the code using the IDE. You will get more explicit messages. The Print class defines two write() methods, but does not implement them. Derived classes are supposed to. What I think you will find is that the derived class does have two write() methods, but that they have the wrong signature. Fix the signature, and add the now required return statement, and you'll be good to go.

Go Up