Being an ultra low power device OLED display is perfect combo for RSL10 to display necessary information. C version of well know U8G2 library is used to interface this 0.96" OLED display with On-Semi RSL10-Sense-Gevk board.
// U8G2 display structure static u8g2_t u8g2; // u8x8_byte_rsl10_hw_i2c and u8x8_gpio_and_delay are hardware related functions. u8g2_Setup_ssd1306_i2c_128x64_noname_1(&u8g2, U8G2_R0, u8x8_byte_rsl10_hw_i2c, u8x8_gpio_and_delay); u8g2_InitDisplay(&u8g2); u8g2_ClearDisplay(&u8g2); u8g2_SetFont(&u8g2,u8g2_font_guildenstern_nbp_t_all);//set current font // Code to display string u8g2_FirstPage(&u8g2); do { u8g2_DrawStr(&u8g2, 60, 60, temp);//write string - you set coordinates and string } while (u8g2_NextPage(&u8g2));
DEMO:
ADS1115 data is being displayed on 0.96" Oled display to test and verify the u8g2 display library.
USEFUL LINKS:
U8G2 C source: https://github.com/olikraus/u8g2/tree/master/csrc
Helpful details: https://github.com/olikraus/u8g2/wiki/Porting-to-new-MCU-platform
Top Comments