diff --git a/6_line_following/main/line_following.c b/6_line_following/main/line_following.c index a601b0f..0a1f120 100644 --- a/6_line_following/main/line_following.c +++ b/6_line_following/main/line_following.c @@ -71,11 +71,11 @@ void calculate_error() { all_black_flag = 0; } - if(line_sensor_readings.adc_reading[i] > 700) + if(line_sensor_readings.adc_reading[i] > BLACK_BOUNDARY) { k = 1; } - if(line_sensor_readings.adc_reading[i] < 700) + if(line_sensor_readings.adc_reading[i] < BLACK_BOUNDARY) { k = 0; } @@ -165,4 +165,4 @@ void app_main() { xTaskCreate(&line_follow_task, "line_follow_task", 4096, NULL, 1, NULL); start_tuning_http_server(); -} \ No newline at end of file +}