I',m trying to set the ports of the SoftwareSerial dynamically when starting a library (controlling an OLED).
After compiling the follwing code I get the message on the cpp file: OLED.h:15: error: 'SoftwareSerial' does not name a type. I've searched the formu and the net and tried several approaches. Can anyone give me a direction what I'm doing wrong?
Thanks Shev and PaulS. I needed both comments to get me further in creating my first simple library in C++ :). Here's the result.
.ino
#include <SoftwareSerial.h> // yes, this is needed here also
#include "OLED.h"
OLED iOLED;
void setup()
{
iOLED.init(9600,12,13);
iOLED.WriteString(2,2,"Test OK today",0); // write Test on position 2,2 with font type 0
}
void loop()
{
/* add main program code here */
}