user1006: I have Arduino Uno and 0.96" I2C Oled 4 Pinned display. These are my Arduino codes:
#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);    // VDD=5V SCL=A5 SDA=A4

int a = 10;

void setup(void) {
}

void loop(void) {

  u8g.setFont(u8g_font_gdr25r);
  u8g.drawStr(8, 30, "E");
  u8g.setFont(u8g_font_gdr25r);
  u8g.drawStr(30, 30,"l");
  delay(2000);  

  //  u8g.println(a);  //This code raw is not working
  //  delay(2000);
}

I am trying to indicate integer type variable is called "a" to the OLED screen, but u8glib library hasn't got 

println( (int) a );

function to do this. I only see 

u8g.drawStr(); 

function that this can't handle integer variables to the display. How can I do that? 

user3917: The U8glib user reference page mentions a couple of ways to print the value of a number using ASCII characters. 
Eg, following the idea at the second mention of sprintf at above link:
char buf[9];
sprintf (buf, "%d", a);
u8g.drawStr(33, 33, buf);

Edit: The above follows the example at the link, but I've struck it out because in general snprintf is safer than sprintf.  See below.
enum {BufSize=9}; // If a is short use a smaller number, eg 5 or 6 
char buf[BufSize];
snprintf (buf, BufSize, "%d", a);
u8g.drawStr(33, 33, buf);

The other way is via print.  (Search for U8GLIB::print in above link, and also see arduino.cc's Print docs).
Eg:
u8g.print(a);

To get a newline effect, you may need to have a variable keeping track of the current line number; add 1 to it to get next line's number, and use that as a position parameter in a drawStr call.

1006: <p>I have Arduino Uno and 0.96" I2C Oled 4 Pinned display. These are my Arduino codes:</p>

<pre><code>#include "U8glib.h"

U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);    // VDD=5V SCL=A5 SDA=A4

int a = 10;

void setup(void) {
}

void loop(void) {

  u8g.setFont(u8g_font_gdr25r);
  u8g.drawStr(8, 30, "E");
  u8g.setFont(u8g_font_gdr25r);
  u8g.drawStr(30, 30,"l");
  delay(2000);  

  //  u8g.println(a);  //This code raw is not working
  //  delay(2000);
}
</code></pre>

<p>I am trying to indicate integer type variable is called "a" to the OLED screen, but u8glib library hasn't got </p>

<blockquote>
  <p>println( (int) a );</p>
</blockquote>

<p>function to do this. I only see </p>

<blockquote>
  <p>u8g.drawStr(); </p>
</blockquote>

<p>function that this can't handle integer variables to the display. How can I do that? </p>
 3917: <p>The <a href="https://code.google.com/p/u8glib/wiki/userreference" rel="nofollow">U8glib user reference</a> page mentions a couple of ways to print the value of a number using ASCII characters. </p>

<p>Eg, following the idea at the second mention of <code>sprintf</code> at above link:<s></p>

<pre><code>char buf[9];
sprintf (buf, "%d", a);
u8g.drawStr(33, 33, buf);
</code></pre>

<p></s><em>Edit:</em> The above follows the example at the link, but I've struck it out because in general <code>snprintf</code> is safer than <code>sprintf</code>.  See below.</p>

<pre><code>enum {BufSize=9}; // If a is short use a smaller number, eg 5 or 6 
char buf[BufSize];
snprintf (buf, BufSize, "%d", a);
u8g.drawStr(33, 33, buf);
</code></pre>

<p>The other way is via <code>print</code>.  (Search for U8GLIB::print in above link, and also see arduino.cc's <a href="https://www.arduino.cc/en/Serial/Print" rel="nofollow">Print</a> docs).</p>

<p>Eg:</p>

<pre><code>u8g.print(a);
</code></pre>

<p>To get a <code>newline</code> effect, you may need to have a variable keeping track of the current line number; add 1 to it to get next line's number, and use that as a position parameter in a <code>drawStr</code> call.</p>
