Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
chore: use full buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
mdvorak committed Feb 6, 2022
1 parent 12ce4bf commit 3c49ea3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ cmake_minimum_required(VERSION 3.15.0)

list(APPEND EXTRA_COMPONENT_DIRS libs/esp-mpu9250/components)

add_compile_definitions(U8G2_WITHOUT_FONT_ROTATION)

include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(esp-motion-reporter-poc)
9 changes: 5 additions & 4 deletions main/app_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,16 @@ void setup()
u8g2_esp32_hal.scl = 22;
u8g2_esp32_hal_init(u8g2_esp32_hal);

u8g2_Setup_ssd1306_i2c_128x64_noname_1(&display, U8G2_R0, u8g2_esp32_i2c_byte_cb, u8g2_esp32_gpio_and_delay_cb);
u8g2_Setup_ssd1306_i2c_128x64_noname_f(&display, U8G2_R0, u8g2_esp32_i2c_byte_cb, u8g2_esp32_gpio_and_delay_cb);
u8x8_SetI2CAddress(&display.u8x8, 0x3C << 1);
u8g2_InitDisplay(&display);
u8g2_SetPowerSave(&display, false);
u8g2_ClearBuffer(&display);
u8g2_ClearDisplay(&display);

// TODO
u8g2_SetFont(&display, u8g2_font_7x13_tr);
u8g2_DrawStr(&display, 0, 0, "FooBar");
u8g2_SetFont(&display, u8g2_font_7x13_mr);
u8g2_DrawStr(&display, 10, 10, "FooBar");
u8g2_SendBuffer(&display);

// Setup Wi-Fi
char device_name[WIFI_AUTO_PROV_SERVICE_NAME_LEN] = {};
Expand Down

0 comments on commit 3c49ea3

Please sign in to comment.