I am very new to Arduino and I have this little bit of code:
if (R2 <= 200){
counter=counter+1;
Serial.print("counter: ");
Serial.println(counter);
}
I want it to count every time R2 is less than or equal to 200, but I only want it to count once. Right now it adds to the counter 3-2 times while R2 is less than 200. I'd like it to only count once while in that range before R2 becomes greater than 200.
Any suggestions or links to helpful information would be very appreciated. Thank you!