Using an 1.3' OLED I2C Screen

Post Reply
Posts: 1
Joined: Wed May 24, 2017 4:24 am
languages_spoken: english

Using an 1.3' OLED I2C Screen

Unread post by carlosed127 » Wed May 24, 2017 5:16 am

Hi to all, I'm having problems making this setup work with Android.

I've followed this tutorial and I can make the tinkering example project work but the thing is that now I want to use this screen with Android but I honestly have no Idea where to continue. What should I do now?
Thank you very much for the help.

User avatar
Posts: 2581
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: X, X2, U2, U3, XU3, C1
Location: Paju, South Korea

Re: Using an 1.3' OLED I2C Screen

Unread post by tobetter » Wed May 24, 2017 8:35 am

I don't know much about the display, but it's very interesting.

I've downloaded the driver files from ... k5xTTBwLWM
I've looked through the source code and it seems you must include all source code (*.c | *.cpp) except in the directory examples to be compiled with your project, and change the file utilities/u8g_com_i2c.c which is most important part to use the display. There are 5 functions what you have to change. I believe that only these functions to be ported to ODROID, other functions are not required to change at all except if there is compile error.
void u8g_i2c_init(uint8_t options)
uint8_t u8g_i2c_wait(uint8_t mask, uint8_t pos)
uint8_t u8g_i2c_start(uint8_t sla)
uint8_t u8g_i2c_send_byte(uint8_t data)
void u8g_i2c_stop(void)
But I think you should port them with Android NDK + WiringPi rather than using Android tinkering example since most functions are not JAVA layer. Even if you merge them to Android project as Tinkering example, you cannot display anything from JAVA since there is no API available to print string or images. So you may consider creating JNI layer to extend the API in the code for the display such as 'u8g.drawBitmapP(...)' to JAVA class.

Maybe I am overthinking or wrong, this is my first impression after reading the code.

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest