File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -296,22 +296,22 @@ def followLine():
296
296
print (sensor1_value , sensor2_value , sensor3_value )
297
297
298
298
# Line following logic
299
- if sensor2_value ( 2 ) < threshold + 1500 :
299
+ if sensor2_value < threshold + 1500 :
300
300
# Line detected by middle sensor, move forward
301
301
AIN1 .duty_cycle = 0
302
302
AIN2 .duty_cycle = 65535
303
303
BIN1 .duty_cycle = 0
304
304
BIN2 .duty_cycle = 65535
305
305
306
- elif sensor1_value ( 0 ) < threshold - 9500 :
306
+ elif sensor1_value < threshold - 9500 :
307
307
# Line detected by left sensor, turn left
308
308
AIN1 .duty_cycle = 0
309
309
AIN2 .duty_cycle = 8000
310
310
BIN1 .duty_cycle = 8000
311
311
BIN2 .duty_cycle = 0
312
312
313
313
314
- elif sensor3_value ( 4 ) < threshold - 9500 :
314
+ elif sensor3_value < threshold - 9500 :
315
315
# Line detected by right sensor, turn right
316
316
AIN1 .duty_cycle = 8000
317
317
AIN2 .duty_cycle = 0
You can’t perform that action at this time.
0 commit comments