diff options
author | Wolfgang (Wolle) Ewald <wolfgang.ewald@wolles-elektronikkiste.de> | 2022-05-01 12:20:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-01 12:20:48 +0200 |
commit | 3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82 (patch) | |
tree | 1cc4a831df0fe99662c3a3ecdc249d7937367ef9 /src/ADS1115_WE.h | |
parent | Add files via upload (diff) | |
download | ADS1115_WE-3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82.tar ADS1115_WE-3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82.tar.gz ADS1115_WE-3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82.tar.bz2 ADS1115_WE-3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82.tar.lz ADS1115_WE-3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82.tar.xz ADS1115_WE-3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82.tar.zst ADS1115_WE-3423c96f6bfbd8ffa5691cb85ab4adfcdf394d82.zip |
Diffstat (limited to 'src/ADS1115_WE.h')
-rw-r--r-- | src/ADS1115_WE.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/ADS1115_WE.h b/src/ADS1115_WE.h index 9443bd8..19f7aff 100644 --- a/src/ADS1115_WE.h +++ b/src/ADS1115_WE.h @@ -24,8 +24,14 @@ #else #include "WProgram.h" #endif +#include "ADS1115_config.h" -#include <Wire.h> +#ifdef USE_TINY_WIRE_M_ + #include <TinyWireM.h> +#endif +#ifndef USE_TINY_WIRE_M_ + #include <Wire.h> +#endif /* registers */ #define ADS1115_CONV_REG 0x00 // Conversion Register @@ -108,8 +114,10 @@ class ADS1115_WE public: ADS1115_WE(int addr); ADS1115_WE(); // uses default I2C Address 0x48 +#ifndef USE_TINY_WIRE_M_ ADS1115_WE(TwoWire *w, int addr); ADS1115_WE(TwoWire *w); +#endif void reset(); bool init(); @@ -268,7 +276,9 @@ public: private: +#ifndef USE_TINY_WIRE_M_ TwoWire *_wire; +#endif uint16_t voltageRange; ADS1115_MEASURE_MODE deviceMeasureMode; int i2cAddress; |