Write down a code for a line following robot which has 2 DC motors, an L298 motor controller and 2 IR sensors. The previous two tutorials can be referred for any doubts.
Reading data from the sensor:
pinMode(IRpin, INPUT);
state = digitalRead(IRpin); //This will give HIGH for white surfaces and LOW for black surfaces
Note: Tinkercad does not have IR sensors in it. So, you only need to submit the code part for this assignment.