![]() |
MatrixMiniR4 1.2.2
Matrix Mini R4 Arduino Library API Documentation
|
A class for MATRIX Line Tracer 10CH sensor. More...
#include <MiniR4_MXLineTracer.h>
Public Member Functions | |
| void | begin () |
| Initialize the LineTracer sensor. | |
| bool | getAllSensors (uint8_t data[10]) |
| Get All sensor value into array. | |
| uint8_t | getSensor (uint8_t n) |
| Get single sensor value. | |
| String | getVersion () |
| Get sensor firmware version. | |
| uint8_t | getLineWidth () |
| Get Line Width. | |
| float | getError () |
| Get Error (Weights based). | |
| bool | isOnline () |
| Is Sensor still online? | |
| uint8_t | getLastSensor () |
| Get last sensor online before robot go offline. | |
| uint8_t | getJunctionType () |
| Get Junction Type. | |
| void | setWeights (float w1, float w2, float w3, float w4, float w5, float w6, float w7, float w8, float w9, float w10) |
| Set Weights for error calc. | |
| void | setThreshold (uint8_t threshold) |
| Set threshold for error calc. | |
| void | startCalibration () |
| Start Calibration Mode. | |
| void | endCalibration () |
| End Calibration Mode. | |
Public Attributes | |
| uint8_t | _ch = 0 |
| I2C multiplexer channel. | |
| TwoWire * | _pWire |
| Pointer to Wire object. | |
A class for MATRIX Line Tracer 10CH sensor.
Definition at line 27 of file MiniR4_MXLineTracer.h.
| void MatrixLineTracer::begin | ( | ) |
Initialize the LineTracer sensor.
Definition at line 12 of file MiniR4_MXLineTracer.cpp.
| void MatrixLineTracer::endCalibration | ( | ) |
End Calibration Mode.
Definition at line 142 of file MiniR4_MXLineTracer.cpp.
| bool MatrixLineTracer::getAllSensors | ( | uint8_t | data[10] | ) |
Get All sensor value into array.
| data | The array need to storage value. |
Definition at line 42 of file MiniR4_MXLineTracer.cpp.
| float MatrixLineTracer::getError | ( | ) |
Get Error (Weights based).
Definition at line 82 of file MiniR4_MXLineTracer.cpp.
| uint8_t MatrixLineTracer::getJunctionType | ( | ) |
Get Junction Type.
Definition at line 113 of file MiniR4_MXLineTracer.cpp.
| uint8_t MatrixLineTracer::getLastSensor | ( | ) |
Get last sensor online before robot go offline.
Definition at line 109 of file MiniR4_MXLineTracer.cpp.
| uint8_t MatrixLineTracer::getLineWidth | ( | ) |
Get Line Width.
Definition at line 74 of file MiniR4_MXLineTracer.cpp.
| uint8_t MatrixLineTracer::getSensor | ( | uint8_t | n | ) |
Get single sensor value.
| n | Sensor ID (1~10). |
Definition at line 57 of file MiniR4_MXLineTracer.cpp.
| String MatrixLineTracer::getVersion | ( | ) |
Get sensor firmware version.
Definition at line 63 of file MiniR4_MXLineTracer.cpp.
| bool MatrixLineTracer::isOnline | ( | ) |
Is Sensor still online?
Definition at line 104 of file MiniR4_MXLineTracer.cpp.
| void MatrixLineTracer::setThreshold | ( | uint8_t | threshold | ) |
Set threshold for error calc.
| threshold | Threshold for line. |
Definition at line 131 of file MiniR4_MXLineTracer.cpp.
| void MatrixLineTracer::setWeights | ( | float | w1, |
| float | w2, | ||
| float | w3, | ||
| float | w4, | ||
| float | w5, | ||
| float | w6, | ||
| float | w7, | ||
| float | w8, | ||
| float | w9, | ||
| float | w10 ) |
Set Weights for error calc.
| w1 | weights for S1 |
| w2 | weights for S2 |
| w3 | weights for S3 |
| w4 | weights for S4 |
| w5 | weights for S5 |
| w6 | weights for S6 |
| w7 | weights for S7 |
| w8 | weights for S8 |
| w9 | weights for S9 |
| w10 | weights for S10 |
Definition at line 117 of file MiniR4_MXLineTracer.cpp.
| void MatrixLineTracer::startCalibration | ( | ) |
Start Calibration Mode.
Definition at line 135 of file MiniR4_MXLineTracer.cpp.
| uint8_t MatrixLineTracer::_ch = 0 |
I2C multiplexer channel.
Definition at line 37 of file MiniR4_MXLineTracer.h.
| TwoWire* MatrixLineTracer::_pWire |
Pointer to Wire object.
Definition at line 38 of file MiniR4_MXLineTracer.h.