Skip to content

Commit

Permalink
Updated macro in hardcoded line black threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperChamp234 committed Feb 2, 2024
1 parent 2850bb4 commit f6ee41e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions 6_line_following/main/line_following.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -165,4 +165,4 @@ void app_main()
{
xTaskCreate(&line_follow_task, "line_follow_task", 4096, NULL, 1, NULL);
start_tuning_http_server();
}
}

0 comments on commit f6ee41e

Please sign in to comment.