This commit is contained in:
26
lib/INA233/INA233.h
Normal file
26
lib/INA233/INA233.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#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;
|
||||
};
|
||||
Reference in New Issue
Block a user