I'm not quite sure what you mean with "read it twice and use the second reading." Are you suggesting something like this?
I didn't write that code so I can't speak to what would do. looping "for" code is sometimes difficult to tweak and trouble shoot. With simple inline code you can simply make two reads like below and the second one is used.
newvalS1 = analogRead(potpinS1);  
newvalS1 = analogRead(potpinS1);           
newvalS1 = map(newvalS1, 0, 1023, 0, 179);