I’m trying to create a generic class that handles Serial Communications. I would like to add SoftwareSerial as a member to this class. So, in my Sample.h file I have the following declaration.
However, I cannot add SoftwareSerial as a data member. Can you please help me as I would like to use this as a property.
The other thought I’ve had is perhaps deriving a class by
class SomeClass : public SoftwareSerial
But don’t think this is an elegant solution. This doesn’t work either.
Can someone help me out please?
Thanks in advance,