It's odd all around. But, if you want a SINGLETON:
PCI.h:
#ifndef PCI_CLASS
#define PCI_CLASS
#include <LiquidCrystal.h>
class PCI {
public:
PCI(const PCI &) = delete;
PCI &operator=(const PCI &) = delete;
static PCI &getInstance();
LiquidCrystal lcd;
private:
PCI() : lcd(12, 11, 5, 5, 3, 2) {}
};
extern PCI &singleton;
#endif
PCI.cpp:
#include "PCI.h"
PCI & PCI::getInstance() {
static PCI instance;
return instance;
}
PCI &singleton {PCI::getInstance()};
Main .ino:
#include "PCI.h"
void setup() {
singleton.lcd.begin(16, 2);
singleton.lcd.print("Hello World");
}
void loop() {
}