Go Down

Topic: Using SoftwareSerial in a library (Read 259 times) previous topic - next topic

mkroll

Hello developers,
I want to create a wrapper library which should use SoftwareSerial internally.
My libraries constructor should take the rx and tx pins only and the SoftwareSerial object is initialzed in its constructor.

When I do the above described I got the following warning:
In file included from BLECentralTest.ino:1:
/Users/michaelkroll/Documents/Arduino/libraries/Test/Test.h:5:28: warning: SoftwareSerial.h: No such file or directory
In file included from Test.ino:1:
/Users/michaelkroll/Documents/Arduino/libraries/Test/Test.h:14: error: 'SoftwareSerial' does not name a type

How should I deal with that.
Any help appreciated,
Michael.
Kind Regards/Mit freundlichen GrĂ¼ssen,
Dr. Michael Kroll.
---
Blog: http://www.mkroll.mobi
Forum: http://forum.mkroll.mobi
Twitter: @dr_m_kr

PaulS

Quote
How should I deal with that.

The same way everyone else does. You must include SoftwareSerial.h in the sketch. No, you can not skip that step.

Go Up