How To Plug Detected Light Values into Variables and Still be Usable in Programs in EV3-G I've seen teams, mostly in the world festival do this, and what they do is they program the robot so that when a brick button is pressed, the robot detects a value (usually RLI) and it is used later in the program. My program looks something like this so far.

Am I on the right track? Is this program correct? Or am I completely wrong?

The program runs OK, but the variable can't be used later in the program.
First guess: the wait for button command is bad practice.  Well, not the whole thing, just the use of the middle button.  The reason is that that button is also used to start the program.  The program may be jumping past the wait for and saving to "Midpoint" before humans notice that the program has started. Try any other brick button.