mirror of
https://github.com/BotChain-Robots/firmware.git
synced 2026-07-08 17:47:21 +02:00
Add distance sensor, rewrite OLED to use new i2c library
This commit is contained in:
21
main/include/control/DistanceSensor.h
Normal file
21
main/include/control/DistanceSensor.h
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
#ifndef DCMOTORACTUATOR_H
|
||||
#define DCMOTORACTUATOR_H
|
||||
|
||||
#include "control/ISensor.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "vl53l0x.h"
|
||||
|
||||
class DistanceSensor final : public ISensor {
|
||||
public:
|
||||
DistanceSensor();
|
||||
~DistanceSensor() override;
|
||||
std::vector<Flatbuffers::sensor_value> get_sensor_data() override;
|
||||
|
||||
private:
|
||||
vl53l0x_t *m_sensor = nullptr;
|
||||
|
||||
};
|
||||
|
||||
#endif //SERVO1ACTUATOR_H
|
||||
Reference in New Issue
Block a user