How to send data to vector of pointer from pulse sensor ? Begging for help!

I download this code which is openframeworks pulse sensor from there

It seems works well that I use this to connect the arduino to openframework .
I can send the data from pulse sensor like BPM to the app .
But , my project is that I want to use the data of pulse sensor to interact with a vector of pointers named carlist .
Every time I update and setup the psensor code into class car , it can’t work .
The screen shows that serial not inited .
I’m so confused , what should i do .
here is the code .

void Car::setup(){

pSensor.setup(-1);    
xPos = ofGetWindowWidth()/2;
yPos = ofGetWindowHeight()/2;
width=2;
r1=320;
r2=400;
x=100;
y=ofRandom(0,10);


thisRadius = ofRandom(r1,r2);


fadeSpeed = ofRandom(0.00001, 0.00045);
addSpeed = ofRandom(0.1, 0.9);
x=ofRandom(-20,20);

}

void Car::update(){        pSensor.update();


 if (width > 0.0001) {
    width-= fadeSpeed;
}
 if (width <=0.0001) {
	 width=ofRandom(1, 3);
}




float timeY = ofGetElapsedTimef() *0.05;
 amplitude = thisRadius + ofRandom(-0.5, 0.5);
float homeY = ofGetWindowHeight()/2;

yPos = homeY + amplitude * sin(timeY)+x;

float timeX = ofGetElapsedTimef() * 0.05;

float homeX = ofGetWindowWidth()/2;

xPos = homeX + amplitude* cos(timeX);

}

;

void Car::draw(){
 ofSetColor(y,y,y)
ofCircle(xPos, yPos, width);

}

app parts :

void ofApp::setup(){

   ofSetVerticalSync(true);
ofBackground( 255, 255, 255 );






pSensor.setup(-1);
thisCar.setup();
numCars =2;
for(int i =0;i<numCars;i++){
	
	
	
	carList.push_back(new Car());
	carList.back()->setup();
}

}

//--------------------------------------------------------------
void ofApp::update(){

thisCar.update();


//y=ofMap(pSensor.BPM,70,120,200,40);
numCars =2;

//update the list of cars
for (int i =0;i<numCars;i++){
	
	carList[i]->update();
}

}

//--------------------------------------------------------------
void ofApp::draw(){

if(pSensor.BPM>0){

ofSetColor(0,0,0);
//ofDrawBitmapString(ofToString(pSensor.BPM), 10, 200);
//draw the single car
//thisCar.draw();


//draw the list of cars
for (int i =0;i<numCars;i++){
	carList[i]->draw();
}

}

}