int segundos = 0;
int contador1 = 0;
int contador2 = 0;
int divisor = 0;
//saida = "";
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
// Envia o cabeçalho do CSV
Serial.println("segundos, contador1, contador2");
}
void loop() {
// put your main code here, to run repeatedly:
segundos = segundos + 1;
divisor = divisor + 1;
if(divisor==4){
contador1 = contador1 + 1;
contador2 = contador2 - 1;
divisor = 0;
//saida = "Segundos," + segundos;
Serial.print(segundos);
Serial.print(",");
Serial.print(contador1);
Serial.print(",");
Serial.println(contador2);
}
delay(1000);
}