#pragma once #include "Arduino.h" #include "Wire.h" #define REGISTER_READ_VIN 0x88 #define REGISTER_READ_VSHUNT 0xd1 class INA233{ public: INA233(uint8_t addr, TwoWire *wire = &Wire); bool begin(const uint8_t sda, const uint8_t scl); float getBusVoltage(void); float getShuntVoltage_mV(void); float getShuntVoltage(void); bool isConnected(void); private: float _current_LSB; float _shunt; float _maxCurrent; uint8_t _address; TwoWire * _wire; };