10#include <soc/gpio_num.h>
11#include <esp_adc/adc_oneshot.h>
22 static constexpr const char* TAG =
"Device::Linefollower";
25 static constexpr uint8_t NUM_LF_MODULES = 2;
26 static constexpr gpio_num_t LF_RIGHT_LEFT_PIN = GPIO_NUM_12;
27 static constexpr adc_channel_t ADC_CHANNEL = ADC_CHANNEL_0;
~Linefollower()
Definition linefollower.cpp:23
Linefollower(Robot &robot)
Definition linefollower.cpp:15
linefollower_id_t
Definition linefollower.h:36
@ RIGHT
Definition linefollower.h:38
@ LEFT
Definition linefollower.h:37
linefollower_result_t
Definition linefollower.h:41
@ BLACK
Definition linefollower.h:42
@ WHITE
Definition linefollower.h:43
linefollower_result_t get_right_sensor_color() const
Get the last measured color from the right sensor.
Definition linefollower.h:72
static constexpr uint16_t REFLECTIVITY_THRESHOLD
Definition linefollower.h:34
void measure()
Measures the currently seen color from both sensors.
Definition linefollower.cpp:42
linefollower_result_t get_left_sensor_color() const
Get the last measured color from the left sensor.
Definition linefollower.h:65
void initialize()
Sets up the necessary GPIO pin and ADC channel.
Definition linefollower.cpp:27
Class containing all the components of the robot.
Definition robot.h:32
log_source
Definition log_sources.h:12
@ LOG_SOURCE_DEVICE_LINEFOLLOWER
Definition log_sources.h:30
Definition battery.cpp:14