Hello! I am trying to add the values read from a voltage divider, but instead my code gives me the same value for sum as for vin. Basically I want it to sum me up the vin value at every loop. I am a newbie, so how can I make that?
As a matter of trivia, the -= and += operators used to be spelled =- and =+ in some of the oldest versions of C (back in the early 1970s). They were changed to the modern spellings because of (I believe) ambiguity in statements like x=-1. I.e., does that statement subtract one from x or set x to negative one?