Ciao a tutti ho risolto stampando riga per riga....posto il codice completo
codice:
int inPin = 7; 
int outPin = 13;        
int state = HIGH;       
int reading;            
int previous = LOW; 
int trascorso = 0; 
long time = 0;          
long debounce = 200;    
void setup() 
{   
        pinMode(inPin, INPUT);   
        pinMode(outPin, OUTPUT);   
        Serial.begin(9600); 
} 
void loop() 
{   
        reading = digitalRead(inPin);     
        if (reading == HIGH && previous == LOW && millis() - time > debounce) 
        {     
                if (state == HIGH){       
                        state = LOW;       
                        Serial.println("\nStato LED: Spento");
                        trascorso = (millis()-time)/1000;
                        Serial.print("Il LED era acceso da ");
                        Serial.print(trascorso);
                        Serial.print(" secondi.");
                }     
                else     
                {       
                        state = HIGH;       
                        Serial.println("\nStato LED: Acceso");
                        trascorso = (millis()-time)/1000;
                        Serial.print("Il LED era spento da ");
                        Serial.print(trascorso);
                        Serial.print(" secondi.");
                }     
                time = millis();       
        }   
        digitalWrite(outPin, state);   
        previous = reading; 
}
CIAO