background image

 

VMA438 

V. 01 – 12/03/2018 

©Velleman nv 

void u8g_prepare(void) { 
  u8g.setFont(u8g_font_6x10); 
  u8g.setFontRefHeightExtendedText(); 
  u8g.setDefaultForegroundColor(); 
  u8g.setFontPosTop(); 

 
void u8g_box_frame(uint8_t a) { 
  u8g.drawStr( 0, 0, "drawBox"); 
  u8g.drawBox(5,10,20,10); 
  u8g.drawBox(10+a,15,30,7); 
  u8g.drawStr( 0, 30, "drawFrame"); 
  u8g.drawFrame(5,10+30,20,10); 
  u8g.drawFrame(10+a,15+30,30,7); 

 
void u8g_disc_circle(uint8_t a) { 
  u8g.drawStr( 0, 0, "drawDisc"); 
  u8g.drawDisc(10,18,9); 
  u8g.drawDisc(24+a,16,7); 
  u8g.drawStr( 0, 30, "drawCircle"); 
  u8g.drawCircle(10,18+30,9); 
  u8g.drawCircle(24+a,16+30,7); 

 
void u8g_r_frame(uint8_t a) { 
  u8g.drawStr( 0, 0, "drawRFrame/Box"); 
  u8g.drawRFrame(5, 10,40,30, a+1); 
  u8g.drawRBox(50, 10,25,40, a+1); 

 
void u8g_string(uint8_t a) { 
  u8g.drawStr(30+a,31, " 0"); 
  u8g.drawStr90(30,31+a, " 90"); 
  u8g.drawStr180(30-a,31, " 180"); 
  u8g.drawStr270(30,31-a, " 270"); 

 
void u8g_line(uint8_t a) { 
  u8g.drawStr( 0, 0, "drawLine"); 
  u8g.drawLine(7+a, 10, 40, 55); 
  u8g.drawLine(7+a*2, 10, 60, 55); 
  u8g.drawLine(7+a*3, 10, 80, 55); 
  u8g.drawLine(7+a*4, 10, 100, 55); 

 
void u8g_triangle(uint8_t a) { 
  uint16_t offset = a; 
  u8g.drawStr( 0, 0, "drawTriangle"); 
  u8g.drawTriangle(14,7, 45,30, 10,40); 
  u8g.drawTriangle(14+offset,7-offset, 45+offset,30-offset, 57+offset,10-offset); 
  u8g.drawTriangle(57+offset*2,10, 45+offset*2,30, 86+offset*2,53); 
  u8g.drawTriangle(10+offset,40+offset, 45+offset,30+offset, 86+offset,53+offset); 

Summary of Contents for VMA438

Page 1: ...VMA438 0 96 INCH OLED SCREEN WITH I2C FOR ARDUINO USER MANUAL ...

Page 2: ...tions of the device before actually using it All modifications of the device are forbidden for safety reasons Damage caused by user modifications to the device is not covered by the warranty Only use the device for its intended purpose Using the device in an unauthorised way will void the warranty Damage caused by disregard of certain guidelines in this manual is not covered by the warranty and th...

Page 3: ...onnection Vcc 5V Gnd Gnd SCL A5 SDA A4 Go to the product page on www velleman eu and download the U8glib zip file Start the Arduino IDE and import this library Sketch Include Library Add Zip library Once finished go back to Sketch Include Library Manage library s and scroll down until you find the U8glib library Select this library and tap Update Now you have the latest version with examples Go to...

Page 4: ...DERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT INDIRECT INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES INCLUDING BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERV...

Page 5: ...0 7 void u8g_r_frame uint8_t a u8g drawStr 0 0 drawRFrame Box u8g drawRFrame 5 10 40 30 a 1 u8g drawRBox 50 10 25 40 a 1 void u8g_string uint8_t a u8g drawStr 30 a 31 0 u8g drawStr90 30 31 a 90 u8g drawStr180 30 a 31 180 u8g drawStr270 30 31 a 270 void u8g_line uint8_t a u8g drawStr 0 0 drawLine u8g drawLine 7 a 10 40 55 u8g drawLine 7 a 2 10 60 55 u8g drawLine 7 a 3 10 80 55 u8g drawLine 7 a 4 10...

Page 6: ...t8_t a if u8g getMode U8G_MODE_HICOLOR u8g getMode U8G_MODE_R3G3B2 draw background area is 128x128 u8g_uint_t r g b b a 5 for g 0 g 64 g for r 0 r 64 r u8g setRGB r 2 g 2 b u8g drawPixel g r u8g setRGB 255 255 255 u8g drawStr 66 0 Color Page else if u8g getMode U8G_MODE_GRAY2BIT u8g drawStr 66 0 Gray Level u8g setColorIndex 1 u8g drawBox 0 4 64 32 u8g drawBox 70 20 4 12 u8g setColorIndex 2 u8g dra...

Page 7: ...ate 7 break case 3 u8g_string draw_state 7 break case 4 u8g_line draw_state 7 break case 5 u8g_triangle draw_state 7 break case 6 u8g_ascii_1 break case 7 u8g_ascii_2 break case 8 u8g_extra_page draw_state 7 break void setup void flip screen if required u8g setRot180 if defined ARDUINO pinMode 13 OUTPUT digitalWrite 13 HIGH endif void loop void picture loop u8g firstPage do draw while u8g nextPage...

Page 8: ...ect use of this device For more info concerning this product and the latest version of this manual please visit our website www velleman eu The information in this manual is subject to change without prior notice COPYRIGHT NOTICE The copyright to this manual is owned by Velleman nv All worldwide rights reserved No part of this manual may be copied reproduced translated or reduced to any electronic...

Page 9: ...n shocks falls dust dirt humidity and by the article as well as its contents e g data loss compensation for loss of profits consumable goods parts or accessories that are subject to an aging process during normal use such as batteries rechargeable non rechargeable built in or replaceable lamps rubber parts drive belts unlimited list flaws resulting from fire water damage lightning accident natural...

Reviews: