Hello,
I have a lcd LM12864MBC-1.
I'm using it with glcd and u8glib and it works fine.
include "U8glib.h"
//**************************************************
// Change this constructor to match your display!!!
U8GLIB_SH1106_128X64 u8g(4, 5, 6, 7);
//**************************************************void setup() {
u8g.setFont(u8g_font_unifont);
u8g.setColorIndex(1); // Instructs the display to draw with a pixel on.
}void loop() {
u8g.firstPage();
do {
draw();
} while( u8g.nextPage() );
delay(1000);
}void draw(){
u8g.drawStr( 0, 20, "Hello World");}
On the other side, i have temp and humidity sensor sht31, connected with I2C.
With the exemple provided by adafruit, it works fine .
#include <Arduino.h>
#include <Wire.h>
#include "Adafruit_SHT31.h"Adafruit_SHT31 sht31 = Adafruit_SHT31();
void setup() {
Serial.begin(9600);while (!Serial)
delay(10); // will pause Zero, Leonardo, etc until serial console opensSerial.println("SHT31 test");
if (! sht31.begin(0x44)) { // Set to 0x45 for alternate i2c addr
Serial.println("Couldn't find SHT31");
while (1) delay(1);
}
}void loop() {
float t = sht31.readTemperature();
float h = sht31.readHumidity();if (! isnan(t)) { // check if 'is not a number'
Serial.print("Temp *C = "); Serial.println(t);
} else {
Serial.println("Failed to read temperature");
}if (! isnan(h)) { // check if 'is not a number'
Serial.print("Hum. % = "); Serial.println(h);
} else {
Serial.println("Failed to read humidity");
}
Serial.println();
delay(1000);
}
I would like now to display the data from sensor on the screen. But when i merge both soft, the screen no longer works.
I found that the bug is comming from the line sht31.begin(0x44).
Is there a conflict between the 2 librairies ? Y there a way to make it works ?
I have a multiplexer TCA9548A. May it help?
Thanks for your help.
Nicolas