Arduino ds3231to TM1638 problems,alarm clock project Good morning,
I am coding an alarm clock on arduino by using a DS3231 and a TM1638.
The code works and the time updates in the serial monitor,although the time doesn't update on the tm1638.
I'll attach the code here:

#include &lt;DS3231.h&gt;  
#include &lt;TM1638.h&gt; 
#include &lt;Streaming.h&gt;  
#include &lt;SPI.h&gt;  
#include &lt;Wire.h&gt;  
#include &lt;InvertedTM1638.h&gt;  
#include &lt;TM1638.h&gt;  
#include &lt;TM1638QYF.h&gt;  
#include &lt;TM1640.h&gt;  
#include &lt;TM16XX.h&gt;  
#include &lt;TM16XXFonts.h&gt;  
byte buttons;  
#define TM1638_STB D5  
#define TM1638_CLK D6  
#define TM1638_DIO D7  

TM1638 module(TM1638_DIO, TM1638_CLK, TM1638_STB);  
// DS3231 uses I2C - device ID 0x68  
// on Wemos mini pins SDA -&gt; D1 and SCL -&gt; D2  
DS3231 rtc;  
int hours;  
int minutes;  
int seconds;  
bool h12; 
bool PM;  
int data; 
RifTime t;  
char buffer[24];  

void setup()  
{  
  // set up the 7-segment display 
  module.clearDisplay();  
  module.setupDisplay(true, 2);  
  Wire.begin();  
  Serial.begin(115200);  

  Serial.println(F("\nDS3231 Hi Precision Real Time Clock"));  

  // Fill these variables with the date and time.  
  int seconds, minutes, hours, dayofweek, dayofmonth, month, year;  

  // Example for april 15, 2013, 10:08, monday is 2nd day of Week.  
  // Set your own time and date in these variables.  
  // dayofweek = 4; // Day of week, any day can be first, counts 1...7  
  hours = 14; 
  minutes = 30;  
  seconds = 0;  
  year = 2019;  
  month = 8; // month 1...12  
  dayofmonth = 28; // Day of month, 1...31  

  data=( hours * 10000 + minutes * 100 + seconds * 1 ); 

  rtc.setClock(year,month,dayofmonth,hours,minutes,seconds);  
} 

void loop()  
{  
  rtc.getTime(t);  
  Serial &lt;&lt; rtc.toString(buffer) &lt;&lt; endl;

  delay(1000); // do nothing  

  module.setDisplayToDecNumber(data,4,false);  

  if(seconds==60) 
  { 
    seconds=00; 
    minutes++; 
  } 
  if(minutes==60)
  {
    minutes=0;
    hours++;
  }

  if(hours==24) 
  { 
    data=00000000; 
  } 

  if((data)==143000) 
  { 
    module.setLEDs(0x0001); 
  } 
  else
  {
    module.setLEDs(0x0000);
  }

}
You set the variable data only in the setup function. 

You also do not print out data to Serial but the output of rtc.toString(buffer). 

If data is not updated in the loop method, the display constantly shows the time you initially set in the setup method.