Go Down

Topic: U8G Library (Read 392 times) previous topic - next topic

HM78

Dec 13, 2017, 08:13 pm Last Edit: Dec 13, 2017, 08:26 pm by HM78
Hello all

I'm using the OLED 0.96 128x32 from bangood:
U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock= SCL*/ 5, /* data= SDA*/ 4);   // pin remapping with ESP8266 HW I2C

I already run the library U8g XBM example on page_buffer and it run great.
Now i tested with a image made by me on black and white and it don't show it right.
I used Paint.net to do the image and LCD assistant to get the bits from it.
Paste it to the .ino file and changed name of variables, width and height of it.

Can anyone help me about to fix the problem?

justjohn

Formatting an image to a code table can be tricky to say the least. Not sure if the program you used to create the table from the bitmap creates one in the exact format that the code expects. It would be my guess that there is where you need to look for a problem. Study your new table, compared to the one used in the library and you may see the problem.

HM78

Thanks for your reply

After few tries with U8g, U8glib and Adafruit and all it works fine with the examples. Almost sure that the conversion is the problem.

Do you another way to create my bmp's files?

justjohn

Not sure but found this.

See what olikraus has to say there - looks like he got something to work. :-)

olikraus

Difficult to say somthing without seeing the actual code ;-)

Usually my suggestion is to use GIMP. Save the image as XBM, paste the XBM result into your ino file and use the u8g2/u8glib drawXBM function.

Oliver


Go Up