sketch_sep14a:4: error: expected unqualified-id before string constant
sketch_sep14a:4: error: expected unqualified-id before 'void'
sketch_sep14a:4: error: expected )' before 'void' sketch_sep14a.ino: In function 'void setup()': sketch_sep14a:2: error: 'ISR' was not declared in this scope sketch_sep14a.ino: In function 'void loop()': sketch_sep14a:8: error: 'inV' was not declared in this scope sketch_sep14a:10: error: 'val' was not declared in this scope sketch_sep14a.ino: At global scope: sketch_sep14a:12: error: expected unqualified-id before string constant sketch_sep14a:12: error: expected unqualified-id before 'void' sketch_sep14a:12: error: expected )' before 'void'
Sorry, I must have fixed that problem on the sketch, I didn't see it on the sketch in my computer. I think it was when I changed the code on the thread I must have mad a mistake.
How you lay your code out can make a big difference to being able to follow it.
Even if you don't intend anyone else to look at it, it is always good to provide plenty of comments. If you come back to this code in 6 or 12 months, after finishing half a dozen other projects, are you going to remember everything about your flow control and variable names chosen?
See a 1 minute edit of your code (after the suggested fising of your comparators) and then can you see what PaulS is saying?
Do not ever do that again. If you need to repost your code, add it in a reply. Changing the initial code makes those who replied look like idiots. Personally, I don't like that, and will no longer try to help you.
Take a look at scopes and where variables need to be declared and what functions they are then available to. That will enable you to sort one of your problems.
The other problem is your choice of name for your interrupt function.