Go Down

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

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
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy