RFduino and Heltec I2C communication

Hi,

Im just working on the final stage of my project. I just need to print some values from the RFDuino into the heltec screen. Both of them are supposed to use I2C communication for this task. However, when I try to use the libraries Adafruit_GFX.h and Adafruit_SSD1306.h. Multiple errors are print. For example:

D:\Program Files (x86)\Arduino\portable\sketchbook\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp: In member function 'void Adafruit_SPITFT::initSPI(uint32_t)':

D:\Program Files (x86)\Arduino\portable\sketchbook\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp:547:30: error: 'SPI1' was not declared in this scope

|| (hwspi._spi == &SPI1)

^

D:\Program Files (x86)\Arduino\portable\sketchbook\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp: In member function 'void Adafruit_GFX::getTextBounds(const String&, int16_t, int16_t, int16_t*, int16_t*, uint16_t*, uint16_t*)':

D:\Program Files (x86)\Arduino\portable\sketchbook\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp:1449:45: error: 'const class String' has no member named 'c_str'

getTextBounds(const_cast<char*>(str.c_str()), x, y, x1, y1, w, h);

^

exit status 1
Error compiling for board RFduino.

Is there any way to use these libraries together with the ones from RFDuino?
How should I communicate them together?
Should I use another screen? If yes, which one?

Thanks

Post your code and links to the product pages of the screen you are using (Typically the I2C version has 4 pins - SDA, SCL and 2 power pins).
The error messages appear to refer to an SPI device.
What board type did you select from the Arduino IDE ? a specific RFduino one ?
You have tested just the screen alone with a simple sketch ?
You are aware that all the RFduino code archives have vanished from Github ?

The library seems to expect two SPI devices, SPI and SPI1, but only SPI is defined as an object. If the RFDuino does not have two such devices, it may be sufficient to define a dummy constant for SPI1. Otherwise it may be hard to find the reason and location for the wrong assumptions about SPI1.

I'm using RFDuino board on the Arduino IDE. Of course, I installed it before.
I have tested the screen with a sketch and is working fine, just show me this kind of erros when trying to include the GFX and SSD1306 library together with RFduino library.
I'm aware that RFDuino is out of the market, but need to use it for this project.

My Code:

#include <RFduinoGZLL.h>
#include <RFduinoBLE.h>
#include <LMP91000.h>
#include <Adafruit_GFX.h>

LMP91000 pStat = LMP91000();

//voltage
int16_t opVolt = 3300; //milliVolts if working with a 3.3V device
int volt_ref= -400; //Voltage runamp

//Resolution
uint8_t resolution = 10; //10-bits

//Flags
boolean RecordOn = false; //Button Flag
int GluRead=0;
int curSec=0;
int recSec=0;
int flag_Insert=0;
int flag_Blood=0;

//Counters
int ct=0; //Counter
int cts=0; //Strip
int ctb=0; //Blood
int ptr=0; //Counter2

//Timer
int WAITTIME = 30000; // The length, in milliseconds
int READTIME = 5000; // The length, in milliseconds
long unsigned int start; //Timing

//Buffer
double GluReads5[5]={0,0,0,0,0};
int FCurrent [1];

//Pins
const int sensorGluPin = 6;// the number of the pushbutton pin
const int MinMenuItems=1;
const int MaxMenuItems=3;
const int Thres_Insert=-5;
const int Thres_Blood=-10;

#define SDA_PIN 2
#define SCL_PIN 4
const int16_t I2C_MASTER = 0x42;

//MAIN MENU

void setup(void)
{

Wire.beginOnPins(SDA_PIN, SCL_PIN);
Serial.begin(115200);
pStat.standby();
delay(1000); //warm-up time for the gas sensor
}

void loop()
{
//strip insertion detection

start = millis();
Serial.print("Insert Strip");
while(millis()-start<WAITTIME)
{

runInsAmp(volt_ref, 10, 1);
Serial.println(GluReads5[ptr]);

if (((GluReads5[0]+GluReads5[1]+GluReads5[2]+GluReads5[3]+GluReads5[4])/5)<Thres_Insert)
{
Serial.println("Flag insert raised");
flag_Insert=1;
break;
}

ptr++;
if (ptr==5) ptr=0;
delay(10);
}

delay(500);
//blood detection
if (flag_Insert==1)
{
start = millis();
//initialization
for (ptr=0;ptr<5;ptr++) GluReads5[ptr]=0;
ptr=0;
flag_Blood=0;
Serial.print("Apply Blood");
while (millis()-start<WAITTIME)
{
Serial.println("while loop");
runInsAmp(volt_ref, 10, 1);
Serial.println(GluReads5[ptr]);

if (((GluReads5[0]+GluReads5[1]+GluReads5[2]+GluReads5[3]+GluReads5[4])/5)<Thres_Blood)
{
Serial.println("Blood Flag raised");
Serial.println(millis());
flag_Blood=1;
break;
}

ptr++;
if (ptr==5) ptr=0;
delay(10);
}
}

else
{
delay(2000);
setup();
}

//Signal Reading
if (flag_Blood==1)
{
LMP();
}

else
{
delay(2000);
setup();
}

}

//Strip/Blood Reading
void runInsAmp(int16_t InsVolt, uint32_t Instime, uint16_t Inssamples)
{
pStat.disableFET();
pStat.setGain(6);
pStat.setRLoad(0);
pStat.setIntRefSource();
pStat.setIntZ(1);
pStat.setThreeLead();
pStat.setBias(0);
int16_t InsvoltageArray[1] = {InsVolt};
uint32_t InstimeArray[1] = {Instime};

for(uint8_t i = 0; i < 1; i++)
{
//For pre-step voltage
uint32_t Insfs = InstimeArray*/1;*
InsvoltageArray = determineLMP91000Bias(InsvoltageArray*);*

_ if(InsvoltageArray < 0) pStat.setNegBias();
* else pStat.setPosBias();*_

* unsigned long startTime = millis();*
_ pStat.setBias(abs(InsvoltageArray*));
while(millis() - startTime < InstimeArray)
{
delay(Insfs);
GluReads5[ptr]=pow(10,6)pStat.getCurrent(pStat.getOutput(sensorGluPin), opVolt/1000.0, resolution);
Serial.println(pow(10,6)pStat.getCurrent(pStat.getOutput(sensorGluPin), opVolt/1000.0, resolution));
}

}
//End at 0V*

* pStat.setBias(0);
}
//Glucose Reading*

void runAmp(uint8_t user_gain, int16_t StepVoltage, uint32_t quietTime, uint16_t samples, uint8_t range)
{
* pStat.disableFET();
pStat.setGain(5);
pStat.setRLoad(0);
pStat.setIntRefSource();
pStat.setIntZ(1);
pStat.setThreeLead();
pStat.setBias(0);
//Current Units*

* String current = "";
if(range == 12) current = "Current(pA)";
else if(range == 9) current = "Current(nA)";
else if(range == 6) current = "Current(uA)";
else if(range == 3) current = "Current(mA)";
else current = "SOME ERROR";*_

// tft.println("Current uA");
* int16_t voltageArray[1] = {StepVoltage};
uint32_t timeArray[1] = {quietTime};
for(uint8_t i = 0; i < 1; i++)
_ {
//For pre-step voltage*

uint32_t fs = timeArray*/samples;
voltageArray _= determineLMP91000Bias(voltageArray);*

_ if(voltageArray < 0) pStat.setNegBias();
* else pStat.setPosBias();*_

* unsigned long startTime = millis();*
_ pStat.setBias(abs(voltageArray*));
// tft.print("PROCESSING...");
while(millis() - startTime < timeArray)
{*_

_ Serial.println(pow(10,range)pStat.getCurrent(pStat.getOutput(sensorGluPin), opVolt/1000.0, resolution));
Serial.print(" ");
Serial.print(millis());
Serial.print(" ");
}
}
//End at 0V*

* pStat.setBias(0);
}
signed char determineLMP91000Bias(int16_t voltage)
{
signed char polarity = 0;
if(voltage < 0) polarity = -1;
else polarity = 1;_

int16_t v1 = 0;
int16_t v2 = 0;
_ voltage = abs(voltage);
if(voltage == 0) return 0;*_

* for(int i = 0; i < NUM_TIA_BIAS-1; i++)
_ {_
v1 = opVoltTIA_BIAS*;
v2 = opVoltTIA_BIAS[i+1];

_ if(voltage == v1) return polarityi;
else if(voltage > v1 && voltage < v2)
{
if(abs(voltage-v1) < abs(voltage-v2)) return polarityi;

else return polarity*(i+1);
* }
}
return 0;
}
//Buttons Strip Proyects*

void LMP()
{
* runAmp(5, volt_ref, 80000, 3200, 6);*
* delay(2000);
setup();
}*

I'm just adding the libraries and then the errors are display for but wire and SPI_