To get your QTR sensors to detect a reflective surface surrounded by a darker surface (e.g. a white line on a black surface), you need to set the optional whiteLine argument to 1 when you call the readLine() method. The whiteLine argument is 0 by default to detect dark lines (e.g. black lines) surrounded by reflective (e.g. white) surfaces, but you can set it to 1 to invert what the method detects. To do this, you can rewrite