Pages: [1]   Go Down
Author Topic: Using SoftwareSerial in a library  (Read 173 times)
0 Members and 1 Guest are viewing this topic.
Zurich
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
WWW
 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,
Michael.
Logged

Kind Regards/Mit freundlichen Grüssen,
Dr. Michael Kroll.
---
Blog: http://www.mkroll.mobi
Forum: http://forum.mkroll.mobi
Twitter: @dr_m_kr

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 551
Posts: 46209
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: