thank you guys! here is what I have so far. I have not had a free moment to go over your suggestions yet but will tonight.
float FireTime = 0.00;
int FirePin = 7;
unsigned long previousMillis3 = 0;
unsigned long currentSec3 = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(FirePin, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
DisplayFireTime();
delay(100);
}
void DisplayFireTime() {
unsigned long currentMillis3 = millis();
if (digitalRead(FirePin) == LOW) {
currentSec3 = (currentMillis3 - previousMillis3) / 1000;
FireTime = currentSec3;
}
else if (digitalRead(FirePin) == HIGH) {
currentSec3 = (currentMillis3 - previousMillis3) / 1000;
FireTime = 0.00;
}
Serial.println(FireTime);
Serial.println(digitalRead(FirePin));
previousMillis3 = currentMillis3;
}
Ive made so many tweaks and changes that I cant remember what I did last xD