/*

  Lucs Torfs - 4/10/2022 
  Opdracht 2.3 cirkel op OLED

*/

#include <Arduino.h>
#include <U8g2lib.h>


#ifdef U8X8_HAVE_HW_I2C
#include <Wire.h>
#endif




U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //wokwi
//U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE);//OLED in onze les

void setup(void) 
{
  u8g2.begin();
}

void loop(void) 
{
  u8g2.clearBuffer();					// clear the internal memory
  u8g2.setFont(u8g2_font_helvR08_tr);
  u8g2.drawCircle(64, 32, 31, U8G2_DRAW_ALL);
    u8g2.drawCircle(64, 32, 21, U8G2_DRAW_ALL);
      u8g2.drawCircle(64, 32, 11, U8G2_DRAW_ALL);
        u8g2.drawCircle(64, 32, 1, U8G2_DRAW_ALL);
  u8g2.setFont(u8g2_font_unifont_t_symbols);

    
    
  u8g2.sendBuffer();					// transfer internal memory to the display
  delay(1000);  
}
Loading
ssd1306