Exemplo n.º 1
0
void u8g_prepare(void) {
    u8g.setFont(u8g_font_6x10);
    //u8g.setFont(bleeding_cowboys);
    u8g.setFontRefHeightExtendedText();
    u8g.setDefaultForegroundColor();
    u8g.setFontPosTop();
}
Exemplo n.º 2
0
void setup()   {
  //u8g.setRot90();

  display_width=u8g.getWidth();
  display_height=u8g.getHeight();
  
  for (uint8_t d=0; d<NUMCHASER; d++) { 
    setupchaser(
                &Chaser[d],
                (boundingbox){.ul={.x=0,.y=0},.lr={.x=(display_width-BITMAP_WIDTH),.y=(display_height-BITMAP_HEIGHT)}}
                );
Exemplo n.º 3
0
void loop(void) {
    // picture loop
    cnt = (cnt + 1) % NUM_TYPE(teststrings);

    u8g.firstPage();
    do {
        draw();
    } while( u8g.nextPage() );
    uiStep();
    // rebuild the picture after some delay
    delay(500);
}
Exemplo n.º 4
0
void loop(void) {
  // picture loop
  u8g.firstPage();
  do {
    draw();
    //delay(500);
  } while( u8g.nextPage() );
  uiStep();
  // rebuild the picture after some delay
  delay(500);

}
Exemplo n.º 5
0
void u8g_ascii() {
    //char * s1 = "The quick brown";
    char * s1 = "next";
    char * s2 = "fox jumps over the";
    char * s3 = "lazy dog.";
    char buf[20] = _U8GT("ASCII Glyph");
    //sprintf (buf, "u32=%d,w=%d,s=%d",sizeof(uint32_t),sizeof(wchar_t),sizeof(size_t));
    //sprintf (buf, "i=%d,l=%d,u=%d",sizeof(int),sizeof(long),sizeof(unsigned));

    //s1 = buf;
    //s2 = teststrings[cnt];
    //s3 = teststrings[(cnt + 1) % NUM_TYPE(teststrings)];

    u8g.drawStr (1, 18, s1);
    u8g.drawStr (5, 36, s2);
    u8g.drawStr (5, 54, s3);
}
Exemplo n.º 6
0
void u8g_chinese() {
    char * s1;
    char * s2;
    char * s3;
    char buf[20] = _U8GT("UTF-8 Glyph");
    //sprintf (buf, "u32=%d,w=%d,s=%d",sizeof(uint32_t),sizeof(wchar_t),sizeof(size_t));
    //sprintf (buf, "i=%d,l=%d,u=%d",sizeof(int),sizeof(long),sizeof(unsigned));

    s1 = buf;
    s2 = teststrings[cnt];
    s3 = teststrings[(cnt + 1) % NUM_TYPE(teststrings)];

    u8g.drawUtf8Str (5, 36, s2);
    u8g.drawUtf8Str (5, 54, s3);
    //sprintf (buf, "ls=%d, wid=%d", u8g.getFontLineSpacing(), u8g.getUtf8StrPixelWidth(s3));
    u8g.drawUtf8Str (1, 18, s1);
}