Esp32-Mcp3008-LineSensor
Library for Espressiff ESP32 based line followers, using the MCP3008 ADC chip.
|
This class represents a single sensor calibration session. More...
#include <mcp3008_linesensor.h>
Public Member Functions | |
~LineSensorCalibrator () | |
void | reset () |
Reset this calibrator to the initial state. More... | |
esp_err_t | record () |
Record current sensor values. More... | |
void | save () |
Store the calibrated values to the parent LineSensor. More... | |
Friends | |
class | LineSensor |
This class represents a single sensor calibration session.
Typical calibration session consists of moving the sensors over the line while calling the record() method over and over, and then storing the data to the LineSensor instance via the save() method.
The parent LineSensor is modified only by the save() method. This calibrator can be reused multiple times by calling the reset() method between each session.
Instances of this class are created via LineSensor's startCalibration(). It must not outlive the parent LineSensor object.
mcp3008::LineSensorCalibrator::~LineSensorCalibrator | ( | ) |
esp_err_t mcp3008::LineSensorCalibrator::record | ( | ) |
Record current sensor values.
Call this repeatedly while moving the sensors over the line.
void mcp3008::LineSensorCalibrator::reset | ( | ) |
Reset this calibrator to the initial state.
void mcp3008::LineSensorCalibrator::save | ( | ) |
Store the calibrated values to the parent LineSensor.
|
friend |