Line Tracking sensor v4 on v5 brain

Please, look at this example of how 3-wire ports can be programmed with V5:

After you configure the port, you can read line follower by calling value() function, see the API

https://api.vexcode.cloud/v5/html/classvex_1_1line.html

Then you treat it the same as in the older RobotC code examples.

More topics with examples: