I want void loop to go through once

Also what you have written in the code is exactly what I was looking for