nguyenho5595 / u8glib

Automatically exported from code.google.com/p/u8glib
Other
0 stars 0 forks source link

Sensor print #150

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, I would like to change values from "u8g.print" to values from sensor, but I 
don't know the right command for it. Here I attach a picture and a code of 
version with text print. Thank you.
 #include "U8glib.h"

U8GLIB_ST7920_128X64 u8g(10, 9, 8, U8G_PIN_NONE);// SPI Com: SCK = en = 10, 
MOSI = rw = 9, CS = di = 8

void draw(void) {
  // graphic commands to redraw the complete screen should be placed here  
  u8g.setFont(u8g_font_fub30n);
  u8g.setPrintPos(0, 32); 
  // call procedure from base class,
  u8g.print("110");
   u8g.setFont(u8g_font_fur14);
  u8g.setPrintPos(81, 25); 
  // call procedure from base class,
  u8g.print("km/h");
   u8g.setFont(u8g_font_helvB10);
  u8g.setPrintPos(1, 62); 
  // call procedure from base class,
  u8g.print("ODO 110110 km ");
   u8g.setFont(u8g_font_helvB10);
  u8g.setPrintPos(1, 50); 
  // call procedure from base class,
  u8g.print("TRIP    110.1 km");
 // u8g.setFont(u8g_font_fur17);
 // u8g.setPrintPos(5, 40);
 // u8g.print("Hello World!");

}

void setup(void) {
Serial.begin(9600);
  // flip screen, if required
  // u8g.setRot180();
}

void loop(void) {
  // picture loop
  u8g.firstPage();  
  do {
    draw();
  } while( u8g.nextPage() );

  // rebuild the picture after some delay
  delay(500);
}

Original issue reported on code.google.com by Jirk...@gmail.com on 3 Mar 2013 at 6:17

Attachments:

GoogleCodeExporter commented 9 years ago
print is identical to the Arduino print procedure:
http://arduino.cc/en/Serial/Print

Original comment by olikr...@gmail.com on 3 Mar 2013 at 6:34

GoogleCodeExporter commented 9 years ago
I´ve used your reference manual, good work. Thank you wery much. It helped to 
me

Original comment by Jirk...@gmail.com on 5 Mar 2013 at 7:37

GoogleCodeExporter commented 9 years ago
then, i hope you got your problems solved

Original comment by olikr...@gmail.com on 5 Mar 2013 at 8:40

GoogleCodeExporter commented 9 years ago
issue closed...

Original comment by olikr...@gmail.com on 19 Mar 2013 at 5:29