yes, sure. The new code is reduced to the essential:
// Include Scheduler since we want to manage multiple tasks.
#include <Scheduler.h>
#define HDMM01_I2C_Addr 0x30
#include <U8glib.h>
U8GLIB_KS0108_128 u8g(22, 23, 24, 25, 26, 27, 28, 29, 17, 14, 15, 16, 30); // 8Bit Com: D0..D7: 22..29 en=17, cs1=14, cs2=15, di=17 (,rw=30)
//KS108: 1=Vss; 2=Vdd; 3=V0; 4=D/I; 5=R/W; 6=E; 7..14=D0..D7; 15=CS1; 16=CD2
// 17=RST; 18=Vee; 19=A; 20=K
int led1 = 13;
int led2 = 12;
int led3 = 11;
void setup() {
Serial.begin(9600);
Serial.println("Setup 01");
// u8g.setFont(u8g_font_4x6);
// u8g.setFontRefHeightExtendedText();
// u8g.setDefaultForegroundColor();
// u8g.setFontPosTop();
// Serial.println("Setup 02");
Scheduler.startLoop(loop2);
Serial.println("Setup 03");
Scheduler.startLoop(loop3);
Serial.println("Setup 04");
}
void loop() {
Serial.println("Loop 1");
delay(1000);
}
void loop2() {
Serial.println("Loop 2");
delay(100);
}
void loop3() {
Serial.println("Loop 3-1");
// u8g.firstPage();
// do
// {
// u8g.drawStr(0,0, "LED");
// }
// while( u8g.nextPage() );
// Serial.println("Loop 3-2");
yield();
}
the serial Windows stays still empty.
After commenting line
//U8GLIB_KS0108_128 u8g(22, 23, 24, 25, 26, 27, 28, 29, 17, 14, 15, 16, 30); // 8Bit Com: D0..D7: 22..29 en=17, cs1=14,
out, I got :
op 3-C!ë 3-1?êë 2
LoÿSetup 01
Setup 03
Setup 04
Loop 1
Loop 3-1
Loop 2
Loop 3-1
Loop 3-1
Loop 3-1
Loop 3-1
Loop 3-1
Loop 3-1
Loop 3-1
Loop 3-1
Loop 3-1
yield() or delay() is important and it is included.
It seems to be in the constructor of u8glib, but why/what?
I have also u8glib v1.12 tested - same result
lowsax