Line follower using 2 given values

So i’m trying to make a line follower follow to different values like this

if(sensorvalue(linefollower)>100<300)

To where it will only active the code if it reads 100 to 300^
How do i properly do that?

if(sensorvalue(linefollower) > 100 && sensorvalue(linefollower) < 300)
should do the trick

2 Likes