why OLED output is different from sketch that i uploaded from arduino example?

Hi,

I was testing out my new 0.96’ OLED 128x64 using example from arduino site ( ssd1306_128x64_i2c).
the display output was ok till the scrolling part where diagonal scrolling left and right was skipped but continued with the random falling of adafruit logo.

Checked Iooking thru the sketch , the code is stated but not perform and skipped. I’m using the latest version of Adafruit SSD1306 (2.0.4).

Anyone can advise me where could the problem be? Thanks.
( part of sketch attached is from arduino example as full sketch exceed 9000 character limit )

// Scroll in various directions, pausing in-between:
display.startscrollright(0x00, 0x0F);
delay(2000);
display.stopscroll();
delay(1000);
display.startscrollleft(0x00, 0x0F);
delay(2000);
display.stopscroll();
delay(1000);
display.startscrolldiagright(0x00, 0x07); <<< this part was skipped from display output
delay(2000);
display.startscrolldiagleft(0x00, 0x07); <<< this part was skipped from display output
delay(2000);
display.stopscroll();
delay(1000);
}

part of sketch attached is from arduino example as full sketch exceed 9000 character limit

Please attach the full sketch to a post as without it help is almost certainly impossible

Hi,

attached done. new to this forum.
thank you.

ssd1306_128x64_i2c.txt (10.6 KB)

You got there in the end !

UKHellBob,

uploading, u mean. haha.
thanks for helping to check what went wrong.

I am not clear as to which part of the program you say is being skipped. Can you please be more specific ?

// Scroll in various directions, pausing in-between:
display.startscrollright(0x00, 0x0F);
delay(2000);
display.stopscroll();
delay(1000);
display.startscrollleft(0x00, 0x0F);
delay(2000);
display.stopscroll();
delay(1000);
display.startscrolldiagright(0x00, 0x07); <<< this part was skipped from display output (A)
delay(2000);
display.startscrolldiagleft(0x00, 0x07); <<< this part was skipped from display output (B)
delay(2000);
display.stopscroll();
delay(1000);
}

I observed the running sequence of the sketch ( which is in order) till the A & B function as stated above. After that the function that follows of random adafruit logo was correctly run.

I’m confuse why it would not run on just A & B functions but the rest of the sketch was in order .

i'm still searching for a cause why OLED output is different from sketch that i uploaded from arduino example?

could it be using a bootloader(old) be the cause of part of the example sketch on OLED being skipped from the output display. I've run thru the above sketch by arduino website, seems ok. what can be the problem?? any advise.

No, nothing to do with bootloader.

So at that point, the sketch just pauses, doing the delays, and display doesn't do the diagonal scrolling(whatever that is)?

Sounds like a bug in the library to me, maybe. Or could be that the diagonal scrolling uses some feature of the display, but there are multiple versions of that display some of which don't have that feature (have seen similar phenomena with "almost 100% compatible" cheap-from-china electronics, don't know about these specific ones)

right, just pause during the diagonal scrolling code , then continue with the adafruit logo random code.

so probably it's the hardware OLED. thanks DrAzzy