ditch that no-good m5 dependancy and do it ourself

This commit is contained in:
Thomas Göttgens
2024-04-21 14:39:55 +02:00
parent 13ebda6b2f
commit 402b0d7e0b
3 changed files with 44 additions and 6 deletions

View File

@@ -1,14 +1,18 @@
#include "../mesh/generated/meshtastic/telemetry.pb.h"
#include "TelemetrySensor.h"
#include <Unit_Sonic.h>
#include <Adafruit_I2CDevice.h>
class RCWL9620Sensor : public TelemetrySensor
{
private:
SONIC_I2C rcwl9620;
uint8_t _addr;
TwoWire *_wire;
protected:
virtual void setup() override;
bool begin(uint8_t addr = 0x57, TwoWire *wire = &Wire);
Adafruit_I2CDevice *i2c_dev = NULL;
float getDistance();
public:
RCWL9620Sensor();