Hello World on U8Glib

Hello World application for Arduino UNO & OLED Mini 128X64 0.96 inch is quite simple. Make the connections as below and upload the code and you're good to go. Please note that you will need to add U8GLib library using Sketch>Include Library>Manage Libraries

But what I want to really cover here is the picture loop for the U8GLib. As you keep connecting more IOT devices your code will easily get unreadable. So I would like to split my pages into functions so in each function I can manage different sensors or inputs in general. So let's leave this "Hello World" application here and get deep into coding with Picture Loop.

Arduino UNO - OLED connection

#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE|U8G_I2C_OPT_DEV_0); // I2C / TWI

void draw() {
u8g.drawStr( 0, 22, "Hello Cuneyt");

void setup(void) {


void loop(void) {
// picture loop
int i = 0;
do {
} while( u8g.nextPage() );