Perhaps I'm overly complicating things, but you know how if you re-write an SSD (solid state computer hard drive) over and over you can eventually get bad (unrecoverable) sectors? (albeit it can take a long time to cause such a failure)
Is the same true with the Atmel chips on the Arduino board? If I'm re-writing a variable's value over and over (as part of the loop) am I causing something to wear out?
Why am I asking ... because in order to weed out erroneous sensor values I am checking a sensor value 4 times (4 passes of the loop), if it's within range all 4 times then it must be valid/true. If there's been more than 6 passes of the loop I'm resetting it to 0 to prevent an overflow. Either way, that's allot of repetitive "writes" to the variable - is this a problem?
My parking sensor code attached, if you're interested
park-sens-uno-v3.ino (2.59 KB)