Pages: [1]   Go Down
Author Topic: Using SoftwareSerial in a library  (Read 244 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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,

Kind Regards/Mit freundlichen Grüssen,
Dr. Michael Kroll.
Twitter: @dr_m_kr

Seattle, WA USA
Offline Offline
Brattain Member
Karma: 644
Posts: 50452
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Pages: [1]   Go Up
Jump to: