datacute / Tiny4kOLED

Library for an ATTiny85 to use an SSD1306 powered, double buffered, 128x32 pixel OLED, over I2C
MIT License
247 stars 36 forks source link

INA219 problem #26

Closed classic-audio closed 4 years ago

classic-audio commented 4 years ago

I have used htis library for several project and all works just fine.

Now I would like the following configuration: ATtiny85 Oled 128x96 INA219 (problem) (with Adafruit_INA219.h )

Compiling -> a lot of errors. What is the solution to this setup?

`

include // Display

include // I2C bus

include "Adafruit_INA219.h" // Display addr: 0x2C

Adafruit_INA219 POS(0x40); // INA219 Positive addr: 0x40

void setup(){ oled.begin(); // Display initialize oled.clear(); // Display oled.on(); // Display POS.begin(); // INA219 POS initialize POS.setCalibration_32V_1A(); // INA219 POS Sensitivity ` }

I have a feeling the problem is INA219 and TinyWireM?

datacute commented 4 years ago

Which version of INA219?

datacute commented 4 years ago

Adafruit_INA219 v1.0.9 supposedly fixes lots of strange errors. The Tiny4kOLED library uses Wire.h by default. If you want it to use TinyWireM, you should include TinyWireM BEFORE Tiny4kOLED.