Weather station sketch size problems

Hello everyone!
I have been working on my final school project which is arduino weather station but I am having problems when trying to show date and time at once on the screen and then measurements such as temperature,humidity,pressure etc. after few seconds.
My sketch´s size suddenly increases massively when I try to input delay and lcd.clear or after trying to work with millis()

This is the error message:Sketch uses 34086 bytes (105%) of program storage space. Maximum is 32256 bytes.
Global variables use 927 bytes (45%) of dynamic memory, leaving 1121 bytes for local variables. Maximum is 2048 bytes.

Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Arduino/Genuino Uno.

And here is my code.

#include "Adafruit_Sensor.h"
#include "Adafruit_BMP280.h"
#include "Arduino.h"
#include "DHT.h" 
#include "U8g2lib.h"
#include "RTClib.h"

RTC_DS3231 rtc;

#define BMP_SCK 13 
#define BMP_MISO 12
#define BMP_MOSI 11 
#define BMP_CS 10 
#define DHTPIN 2     
#define DHTTYPE DHT22 

Adafruit_BMP280 bmp;
DHT dht(DHTPIN, DHTTYPE);
int temt6000Pin = 0;

#ifdef U8X8_HAVE_HW_SPI 
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif 

char daysOfTheWeek[7][12] = {"Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "ÄŚetvrtak", "Petak", "Subota"};

 
U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);


void setup() {
  Serial.begin(9600);
  rtc.begin();
   dht.begin();
  u8g2.begin();  
  u8g2.clear();
  bmp.begin();
}
void loop(){

    u8g2.firstPage();
  do{
    draw();
  } while ( u8g2.nextPage() );
    delay(1000);
  }
void draw(void) {
  float volts = analogRead(A0) * 5.0 / 1024.0;
float amps = volts / 10000.0;  // across 10,000 Ohms
float microamps = amps * 1000000;
float lux = microamps * 2.0;
  int value=analogRead(temt6000Pin);
  DateTime now = rtc.now();

u8g2.clear();
u8g2.setFont(u8g2_font_t0_13b_tf);
  u8g2.setCursor(20, 9);
  u8g2.print("Indoor");
  
  u8g2.setFont(u8g2_font_helvB12_tf);
  u8g2.setCursor(0, 23);
  u8g2.print("T="); 
  u8g2.print(dht.readTemperature()); 
  u8g2.print(" *C");

  u8g2.setFont(u8g2_font_helvB12_tf);
  u8g2.setCursor(0, 37);
  u8g2.print("H="); 
  u8g2.print(dht.readHumidity()); 
  u8g2.print(" %");

u8g2.setFont(u8g2_font_helvB12_tf);
  u8g2.setCursor(0,51);
  u8g2.print("P= ");
  u8g2.print(bmp.readPressure()/100);
  u8g2.print(" hPa");
  
u8g2.setFont(u8g2_font_helvB12_tf);
u8g2.setCursor(0, 65);
   u8g2.print("L="); 
  u8g2.print(lux); 
  u8g2.print (" LX");

  delay(5000);
  u8g2.clear();
  
   u8g2.setFont(u8g2_font_helvR14_tf);
    u8g2.setCursor(50,26);
    u8g2.print(now.day(), DEC);
    u8g2.print(".");
    u8g2.print(now.month(), DEC);
    u8g2.print('.');
    u8g2.print(now.year(), DEC);
    u8g2.print('.');
    u8g2.setFont(u8g2_font_fub30_tf);
    u8g2.setCursor(50,48);
    u8g2.print(now.hour(), DEC);
    u8g2.print(':');
    u8g2.print(now.minute(), DEC);
  
}

Don't use so many different fonts in your draw() function.

If you comment out 'u8g2.setFont(u8g2_font_fub30_tf);' you go from 105% -> 78%

So,this is my code with Millis() function.It still says that this one´s sketch is too big being:

Sketch uses 34214 bytes (106%) of program storage space. Maximum is 32256 bytes.
Global variables use 933 bytes (45%) of dynamic memory, leaving 1115 bytes for local variables. Maximum is 2048 bytes.

Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
Error compiling for board Arduino/Genuino Uno.

Am I doing something wrong and how can I make this code so that my screen shows my measurements from sensors for a couple of seconds and after that it shows date and time? And that is supposed to go in a loop.

#include "Adafruit_Sensor.h"
#include "Adafruit_BMP280.h"
#include "Arduino.h"
#include "DHT.h" 
#include "U8g2lib.h"
#include "RTClib.h"

RTC_DS3231 rtc;

#define BMP_SCK 13 //BMP280 TLAK ZRAKA
#define BMP_MISO 12
#define BMP_MOSI 11 
#define BMP_CS 10 //BMP280 TLAK ZRAKA
#define DHTPIN 2     // what pin we're connected to
#define DHTTYPE DHT22 

Adafruit_BMP280 bmp;
DHT dht(DHTPIN, DHTTYPE);
int temt6000Pin = 0;

int draw_state = 0;
unsigned long previousMillis = 0;
long interval = 3000;

#ifdef U8X8_HAVE_HW_SPI 
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif 

char daysOfTheWeek[7][12] = {"Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"};

 
U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);


void setup() {
  Serial.begin(9600);
  rtc.begin();
   dht.begin();
  u8g2.begin();  
  u8g2.clear();
  bmp.begin();
}
void loop(){
 int value=analogRead(temt6000Pin);
  float h = dht.readHumidity();
  float t = dht.readTemperature();
  float volts = analogRead(A0) * 5.0 / 1024.0;
float amps = volts / 10000.0;  // across 10,000 Ohms
float microamps = amps * 1000000;
float lux = microamps * 2.0;


  unsigned long currentMillis = millis();
  if (currentMillis - previousMillis > interval) {
    previousMillis = currentMillis;
    u8g2.firstPage();
  do{
     switch (draw_state ) {
  case 0: drawIndoor();break;
  case 1: drawDate();break;
     }
  } while ( u8g2.nextPage() );
    draw_state++;
    if(draw_state >1){
      draw_state=0;
    }
  }
  }
void drawIndoor(void) {
   float volts = analogRead(A0) * 5.0 / 1024.0;
float amps = volts / 10000.0;  // across 10,000 Ohms
float microamps = amps * 1000000;
float lux = microamps * 2.0;

  int value=analogRead(temt6000Pin);

u8g2.setFont(u8g2_font_t0_13b_tf);
  u8g2.setCursor(20, 9);
  u8g2.print("Indoor");
  
  u8g2.setFont(u8g2_font_helvB12_tf);
  u8g2.setCursor(0, 23);
  u8g2.print("T="); 
  u8g2.print(dht.readTemperature()); 
  u8g2.print(" *C");
  
  u8g2.setCursor(0, 37);
  u8g2.print("H="); 
  u8g2.print(dht.readHumidity()); 
  u8g2.print(" %");
  
  u8g2.setCursor(0,51);
  u8g2.print("P= ");
  u8g2.print(bmp.readPressure()/100);
  u8g2.print(" hPa");
  
u8g2.setCursor(0, 65);
   u8g2.print("L="); 
  u8g2.print(lux); 
  u8g2.print (" LX");
}
  
void drawDate()
{
  DateTime now = rtc.now();
   u8g2.setFont(u8g2_font_helvR14_tf);
    u8g2.setCursor(50,26);
    u8g2.print(now.day(), DEC);
    u8g2.print(".");
    u8g2.print(now.month(), DEC);
    u8g2.print('.');
    u8g2.print(now.year(), DEC);
    u8g2.print('.');
    u8g2.setFont(u8g2_font_fub30_tf);
    u8g2.setCursor(50,48);
    u8g2.print(now.hour(), DEC);
    u8g2.print(':');
    u8g2.print(now.minute(), DEC);
}

EDIT: :slight_smile:
My bad this time,forgot to comment that line that you said earlier. :´)
It works perfectly now,THANKS A LOT! <3

One more remark: Fonts are available in different sizes (exactly because of the flash ROM problem). In your code you always request very big fonts. For example instead of "u8g2_font_helvR14_tf" use "u8g2_font_helvR14_tr" or "u8g2_font_helvR14_tn" (please check the wiki). The last letter always indicates the size of the font. The "n" version only includes those chars which are required for date/time values.

Oliver