+#include <TinyScreen.h>
 #include <TimeLib.h>
 #include <SPI.h>
 #include <BLEPeripheral.h>

}

void renderTime(){
  if(isTimeSet){
    buffer.drawText(((String)hour() + ":" + (String)minute() + ":" + (String)second()).c_str(),15,8,buffer.rgb(255,0,0), &virtualDJ_5ptFontInfo);    
  }
}

//TODO: Method to render date.
/*void renderDate(){
  buffer.drawText(stringBuffer.start().putDec(month()).put("-").putDec(day()).put("-").putDec(year()).get(),15,16,buffer.rgb(255,0,0), &virtualDJ_5ptFontInfo);
}*/

//TODO: Method to render background.


void loop() {
  blePeripheral.poll();
  BLECentral central = blePeripheral.central();
  if(central && central.connected()){
    if(isTimeSet){
      renderTime();
      renderDate();
    }
  } else{
    messageWithSecondDelay("searching...");
  }
  refreshScreen();
}

