double v = 0; double volt = 0; //float v, volt; //pinMode(8, OUTPUT); //pinMode(A0, INPUT); void setup() { // put your setup code here, to run once: pinMode(8, OUTPUT); pinMode(A0, INPUT); Serial.begin(9600); //****************************************************** Serial.println("CLEARDATA"); //Comandos para interface com Excel Serial.println("LABEL,TEMPO,VOLTAGEM"); //***************************************************** } void loop() { // put your main code here, to run repeatedly: digitalWrite(8, HIGH); do { volt = analogRead(A0); v = (5*volt)/1023; Serial.print("DATA, "); //Comando para interface com Excel unsigned long currentMillis = millis(); //Tempo atual em ms Serial.print(currentMillis); Serial.print(" , "); Serial.println(v); } while (volt != 1021); digitalWrite(8, LOW); do { volt = analogRead(A0); v = (5*volt)/1023; Serial.print("DATA, "); //Comando para interface com Excel unsigned long currentMillis = millis(); //Tempo atual em ms Serial.print(currentMillis); Serial.print(" , "); Serial.println(v); } while (volt != 1); }