if (millis() < pubblica) pubblica = millis();
if ((millis() - pubblica) > UPDATE_INTERVAL){
How is it possible for millis() to return a value less than pubblica? The pubblica variable starts at 0, so millis() will not be less than 0. When the UPDATE_INTERVAL time has passed, pubblica is updated to when the event occurred. The millis() function can never return a value that is less than what it returned last time, unless you have installed it in Rocky and Bullwinkle's way back machine. Therefore, that first statement will NEVER evaluate to true.
Perhaps you need to uncomment some of the commented out Serial.print() statements, to see why nothing beyond the setup() statement is executed.