Skip to content

fix ELW0901AA issues #2135 - #2785

Open
iggymayer wants to merge 6 commits into
olikraus:masterfrom
iggymayer:fix-issues-#2135
Open

fix ELW0901AA issues #2135#2785
iggymayer wants to merge 6 commits into
olikraus:masterfrom
iggymayer:fix-issues-#2135

Conversation

@iggymayer

Copy link
Copy Markdown
Contributor

fix issues #2135
I2C & SPI test passed
Notice: If using I2C, the I2C buffer size needs to be increased: Wire.setBufferSize(600);
IMG_2097

@iggymayer iggymayer changed the title fix issues #2135 fix ELW0901AA issues #2135 Jun 10, 2026
@olikraus

Copy link
Copy Markdown
Owner

What is the issue with the buffer size? The problem is, that this is a restriction of the Arduino framework.
U8g2 architecture tries to deal with the limited buffer.

@olikraus

Copy link
Copy Markdown
Owner

where exactly is the i2c buffer size increased?

@iggymayer

Copy link
Copy Markdown
Contributor Author

when using the hardware I2C interface, several bright dots appear on one side of the screen (not damaged). The data being sent exceeds the default size of the Arduino Wire library's send buffer. Due to my limited abilities, this is the only solution I can think of at the moment.

#include <Arduino.h>
#include <U8g2lib.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif
#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif

#define RES_PIN 21
#define HV_EN 1

U8G2_LD7032_128X36_F_HW_I2C u8g2(U8G2_R0, RES_PIN);

void setup(void) 
{
    pinMode(HV_EN, OUTPUT);
    digitalWrite(HV_EN, HIGH);

    Wire.setBufferSize(600);

    u8g2.begin();
    u8g2.setFontPosTop();
}

void loop(void) 
{
    u8g2.clearBuffer();
    u8g2.setFont(u8g2_font_spleen6x12_mf);
    u8g2.drawStr(0,0,"Hello World!");
    u8g2.drawBox(99, 0, 99, 36);
    u8g2.sendBuffer();

    delay(1000);
}

@olikraus

Copy link
Copy Markdown
Owner

the u8x8_cad_ld7032_i2c procedure will break this down to smaller blocks, except for the init sequence.
If the init sequence is more than 32 bytes it might be a problem.

uint8_t u8x8_cad_ld7032_i2c(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)

@olikraus

olikraus commented Jun 27, 2026

Copy link
Copy Markdown
Owner

A solution could be to reduce the size of u8x8_d_ld7032_128x36_init_seq.
We could also have two arrays and send both arrays one after the other.

Maybe that is also the reason why the 60x32 never worked for me with I2C

I could also try to update the cad procedure: The buffer could be flushed with every new command. (buffer flush probably is not allowed during arg transmission). Let me create an issue for this.

I think fixing u8x8_cad_ld7032_i2c would be the most compatibe solution from my perspective (provided, that the init sequence is the problem)

@olikraus

olikraus commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Here is my suggestion: I will try to fix u8x8_cad.c, then we can include your LD7032 code.
issue: #2789

@iggymayer

Copy link
Copy Markdown
Contributor Author

Okay, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants