Hi!
I am trying to build a library for my gps module and am having a hard time implementing the SoftwareSerial library within the private class. How might I go about this?
Here is my header file:
#include "uBlox.h"
#include "Arduino.h"
#include "SoftwareSerial.h"
uBlox::uBlox(int rx, int tx) {
SoftwareSerial gps(rx, tx);//initialize the serial connection (This needs to be as uBlox private so that future functions can access it.)
}
uBlox::~uBlox() { } //Why do I need this??
void configure() {
}
And the C++ file.
#include "uBlox.h"
#include "Arduino.h"
#include "SoftwareSerial.h"
uBlox::uBlox(int rx, int tx) {
SoftwareSerial gps(rx, tx);//initialize the serial connection (This needs to be as uBlox private so that future functions can access it.)
}
uBlox::~uBlox() { } //Why do I need this??
void configure() {
}