code: function update(){
      now = new Date();
      var time = now.getHours().toString() + ("0" + now.getMinutes().toString()).slice(-2);
      display.writeString(time);
      display.setColon(colon = !colon);
  }
docs: Display and time update function