#include "U8glib.h"
U8GLIB_SSD1306_128X64 u8g; // create an instant of OLED display
void setup() {
u8g.setFont(u8g_font_7x13); // set the font for text
//u8g.setColorIndex(1); set the display colour can be done outside picture loop
}
void loop() {
u8g.firstPage(); //marks the beginning of the picture loop.
do {
u8g.setColorIndex(1); // set the colour to white
u8g.drawCircle(64,20,10); // draw circle with centre at (64,20) and radius = 10
u8g.setColorIndex(0); //change the colour back to black
u8g.setColorIndex(1); // set the colour to white
u8g.drawCircle(32,20,10); // draw circle with centre at (32,20) and radius = 10
u8g.setColorIndex(0); //change the colour back to black
u8g.setColorIndex(1); // set the colour to white
u8g.drawCircle(48,40,10); // draw circle with centre at (48,40) and radius = 10
u8g.setColorIndex(0); //change the colour back to black
u8g.setColorIndex(1); // set the colour to white
u8g.drawCircle(80,40,10); // draw circle with centre at (80,40) and radius = 10
u8g.setColorIndex(0); //change the colour back to black
u8g.setColorIndex(1); // set the colour to white
u8g.drawCircle(96,20,10); // draw circle with centre at (96,20) and radius = 10
u8g.setColorIndex(0); //change the colour back to black
} while ( u8g.nextPage() ); //marks the end of the body of the picture loop
u8g.setColorIndex(1);
u8g.drawStr(0, 20, "outside");
//drawing function must use inside the picture loop.
}