'draw' was not declared in this scope

Hi,

I’m new to arduino and have no idea what i’m really doing… Although I’ve been working on a code and for some reason it doesn’t want to compile. The project had a heart pulse monitor, two vibrating motors and an lcd. The idea is to get the vibrating motors to beat the same time as the heart pulse, which I have working but I want to get the BMP and a timer no the LCD. What im trying to do now is just get the LCD code and the heart rate and vibrating motor working in one code.

It states on the code that the

void loop(void) {
// picture loop
u8g.firstPage();
do {
draw(); << the draw was not declared on the scope. Is it because I have not stated it elsewhere?
} while( u8g.nextPage() );

Sorry, it may seem like a stupid question. But I dont really understand coding, it’s part of an assignment and we havent been taught coding. Essentially we are expected to learn coding and get something working within 11 weeks. So i apologize if it is a stupid question.

This is the full -

#include <U8glib.h>

#include <U8glib.h>
U8GLIB_SSD1351_128X128_332 u8g(13, 11, 8, 9, 7); // Arduino UNO: SW SPI Com: SCK = 13, MOSI = 11, CS = 8, DC = 9, RESET = 7 (http://electronics.ilsoft.co.uk/ArduinoShield.aspx)

int Heart = A0;
int value = 0;
int Motor = 12;
int Thresh = 350;
int ReadRate = 25;
int UnderCount = 0;
int OverCount = 0;
String OutValue = “”;
int read = 12;

void setup() {
// flip screen, if required
// u8g.setRot180();

// set SPI backup if required
//u8g.setHardwareBackup(u8g_backup_avr_spi);

// assign default color value
if ( u8g.getMode() == U8G_MODE_R3G3B2 ) {
u8g.setColorIndex(255); // white
}
else if ( u8g.getMode() == U8G_MODE_GRAY2BIT ) {
u8g.setColorIndex(3); // max intensity
}
else if ( u8g.getMode() == U8G_MODE_BW ) {
u8g.setColorIndex(1); // pixel on
}
else if ( u8g.getMode() == U8G_MODE_HICOLOR ) {
u8g.setHiColorByRGB(255,255,255);
}

// put your setup code here, to run once:
Serial.begin(19200);
pinMode(Motor, OUTPUT);
//delay(5000);
}

void loop() {
// picture loop
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );
}
// put your main code here, to run repeatedly:
value = analogRead(Heart);
//Serial.println(value);
if (value > 550){
OverCount = OverCount + 1;
UnderCount = UnderCount + 1;
}
else{
UnderCount = UnderCount + 1;

}

float TestF = (OverCount/(UnderCount*0.1)*100);
String OutValue = String (TestF/2);
//Serial.println(OutValue + " BPM");
Serial.println(value);
if (value > Thresh ){
digitalWrite(Motor, HIGH);
delay(50);
digitalWrite(Motor, LOW);
}
else{
delay(50);
}

if (UnderCount > 50){
UnderCount = 0;
OverCount = 0;
}
delay(ReadRate);

}

void draw(void) {
// graphic commands to redraw the complete screen should be placed here
//u8g.setFont(u8g_font_unifont);
//u8g.setFont(u8g_font_osb21);
//int value = 0;
//char buf[9];
//sprintf (buf, “%d”, value);
//u8g.drawStr( 0, 40, buf);
String value = “test”;
value = read();
u8g.setPrintPos( 0, 40);
u8g.print(value);
}

void loop(void) {
// picture loop
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );

Maybe u8g.draw() ?

No idea further, I could not easily find specifics in the library on the web.