#include <Arduino.h>
#include <U8g2lib.h>
//#include "U8glib-HAL.h"
#include "U8g2lib.h"
#include "icons.h"
#include "params.h"
//U8G2LIB_SSD1306_128X64 u8g2(U8G2_I2C_OPT_DEV_0 | U8G2_I2C_OPT_NO_ACK | U8G2_I2C_OPT_FAST); // Fast I2C / TWI
U8G2_SSD1306_128X64_NONAME_1_HW_I2C(U8G2_R0); //, [reset [, clock, data]])
void setup() {
//U8G2.setColorIndex(1); // set the color to white
U8G2.setBitmapMode(1);
}
void loop() {
//u8g.drawXBM(loc x, loc y, size x, size y, bitmap);
U8G2.firstPage(); // required for page drawing mode for u8g library
//u8g.drawXBM(0, 22, 128/8, 21, bitmap_item_sel_outline);
do{
//wifi icon
U8G2.drawXBM(112, 0, 16, 16, epd_bitmap_1616[3]);
//3030 icons
U8G2.drawXBM(12, 18, 30, 30, epd_bitmap_3030[3]);
U8G2.drawXBM(49, 18, 320, 30, epd_bitmap_3030[5]);
U8G2.drawXBM(86, 18, 30, 30, epd_bitmap_3030[6]);
//arrows
U8G2.drawXBM(0, 25, 14, 14, epd_bitmap_elements[0]);
U8G2.drawXBM(118, 25, 14, 14, epd_bitmap_elements[2]);
//elements
U8G2.drawXBM(0, 59, 128, 5, epd_bitmap_elements[5]);
U8G2.drawXBM(47, 16, 34, 34, epd_bitmap_elements[6]);
}
while ( U8G2.nextPage() );
//u8g.setFont(u8g_font_7x14);
//u8g.drawStr(25, 15, menu_items[item_sel_previous]);
//u8g.drawXBM( 4, 2, 16/8, 16, bitmap_icons[item_sel_previous]);
}Loading
esp32-c3-devkitm-1
esp32-c3-devkitm-1