Pages: [1]   Go Down
Author Topic: Arteffects! 128x64 LCD ST7920  (Read 1996 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Did anyone experiense arteffects using 128x64 LCD screen on ST7920 chipset?

Screen connected serial, using U8glib library!


* IMAG1654.jpg (1676.39 KB, 3264x1840 - viewed 149 times.)
Logged

Western New York, USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 4328
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
... arteffects ...

Would you be referring to 'art effects' or to 'artifacts' ?  I suspect the latter, in which case we would have to know what you were expecting to see and how you were generating the information.

Don
« Last Edit: January 16, 2013, 03:47:54 pm by floresta » Logged

Germany
Offline Offline
Edison Member
*
Karma: 136
Posts: 1491
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I can confirm that I have seen similar pictures during development of u8glib. While i also think that some of these results would make nice looking pictures, they are usually not intended.

The ST7920 controller is probably the device which consumed most of my attension during u8glib development and support. Here are my suggestions (from endless discussions with other users):
- Use the latest u8glib version. Nearly all recent updates of u8glib include fixes for the ST7920
- Solder your wires.
- Use short wires (less than 10cm)

Which serial interface did you test? HW SPI or SW SPI?

Oliver
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

:-)

No I ment Art effects, not artefacts :-) however this might be a case too ))) now it's early morning around 3:00 AM and arteffects are all around me and my slippy eyes :-)

Yes at the moment it's quite messy around this LCD and some wires are quite long. It's way early to solder something out as prototyping have not beeing completed yet, there are few more bits and pices to add....

Here is my configuration:

Arduino NANO 328
NRF24L01+ 2.4Ghz module +
1 Analog Joystick from Sony PS2 joypad + few resistors to measure battery voltage
well I gues that is all right now

All these connected, hell I do not even know who did I do it ))))
Well for sure LCD is connected to the following pins:

K GND - GND
A - 680R - 5V
E - D6
RW - D5
RS - D4

after few resets, usually in 5-10 seconds of up time they start to dissapear.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Guys,

I finally managed to do some kinda menu with 2 levels down (only first line workable for now), it's not optimized as I'm still learning the language! please do not be rough with me for now...

Can someone help me to move animation and other non critical info into SD memory, is it possible to do that?

here is the code:

Code:
#include "U8glib.h"
#include <SPI.h>
#include <Mirf.h>
#include <nRF24L01.h>
#include <MirfHardwareSpiDriver.h>
#include "LowPower.h"

U8GLIB_ST7920_128X64 u8g(6, 5, 4, U8G_PIN_NONE);                  // SPI Com: SCK = en = 18, MOSI = rw = 16, CS = di = 17


byte vals [10];  
byte sens [10];

#define width 128
#define height 64
#define KEY_NONE 0
#define KEY_PREV 1
#define KEY_NEXT 2
#define KEY_SELECT 3
#define KEY_BACK 4

int x = 0;
int y = 0;
int val1;
int val2;
int PosX;
int PosY;
int potPin=A0;                              //Analog 0 connected to the potentiometer
int LEDPin=10;                              //Connected to LED on Pin 6
int potValue=0;                             //Value returned from the potentiometer
int batCheck = A7;
const int wakeUpPin = 9;
int key;

uint8_t uiKeyPrev;
uint8_t uiKeyNext;
uint8_t uiKeySelect;
uint8_t uiKeyBack;

uint8_t uiKeyCodeFirst = KEY_NONE;
uint8_t uiKeyCodeSecond = KEY_NONE;
uint8_t uiKeyCode = KEY_NONE;

long previousMillis = 0;
long interval = 500;

unsigned long time1;
unsigned long time2;
unsigned long delayReply;
int SignalBar;

//static unsigned char u8g_logo_bits[] = {
static unsigned char logo1[] U8G_PROGMEM = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xFF,0x1F,0x00,0x00,0x01,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0x5F,0xFD,0xFF,0x03,0xC0,0x03,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0xF0,0x1F,0x00,0x00,0xF0,0x3F,0xF0,0x01,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0xFF,0x3F,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xC0,0x8F,0x00,0x00,0x00,0x00,0xF2,0x1F,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xF0,0x83,0xFF,0x07,0x00,0xFF,0xE3,0x3F,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x7C,0x00,0x78,0x00,0x00,0x70,0x7C,0xFC,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x1F,0x00,0x70,0x00,0x00,0x30,0x0E,0xF0,0x03,0x00,0x00,0x00,

0x00,0x00,0x00,0xC0,0x0F,0x00,0x70,0x00,0x00,0xF0,0x03,0xC0,0x07,0x00,0x00,0x00,

0x00,0x00,0x00,0xE0,0x03,0x00,0x63,0x00,0x00,0xF0,0x00,0x80,0x1F,0x00,0x00,0x00,

0x00,0x00,0x00,0xF0,0x00,0x80,0xE7,0x00,0x00,0x3C,0x00,0x00,0x3E,0x00,0x00,0x00,

0x00,0x00,0x00,0x78,0x00,0x80,0xE7,0x00,0x80,0x0F,0x00,0x00,0x7C,0x00,0x00,0x00,

0x00,0x00,0x00,0x3E,0x00,0x80,0xC3,0x00,0xE0,0x0D,0x00,0x00,0xF8,0x00,0x00,0x00,

0x00,0x00,0x00,0x1E,0x00,0x80,0xC3,0x01,0x7C,0x04,0x00,0x00,0xF0,0x01,0x00,0x00,

0x00,0x00,0x00,0x0F,0x00,0x80,0x87,0x01,0x0F,0x04,0x00,0x00,0xE0,0x03,0x00,0x00,

0x00,0x00,0x80,0x07,0x00,0x80,0x87,0xE3,0x03,0x06,0x00,0x00,0xE0,0x03,0x00,0x00,

0x00,0x00,0xC0,0x07,0x00,0x80,0x87,0xF3,0x00,0x02,0x00,0x00,0xC0,0x07,0x00,0x00,

0x00,0x00,0xF0,0xEF,0xE7,0xEF,0x07,0x1F,0x00,0x02,0x00,0x00,0xC0,0x07,0x00,0x00,

0x00,0x00,0xF0,0xFF,0xFF,0xFF,0xC7,0x07,0x00,0x01,0x00,0x00,0x80,0x0F,0x00,0x00,

0x00,0x00,0xF8,0xFF,0xFF,0xFF,0xEF,0x07,0x00,0x01,0x00,0x00,0x80,0x0F,0x00,0x00,

0x00,0x00,0xF8,0xFF,0xFF,0xFF,0x3F,0x0E,0x00,0x01,0x00,0x00,0x80,0x0F,0x00,0x00,

0x00,0x00,0xF8,0xFF,0xFF,0xFF,0x0F,0x0E,0x80,0x01,0x00,0x00,0x80,0x0F,0x00,0x00,

0x00,0x00,0xF0,0xFF,0xFF,0xFF,0x07,0x0E,0x80,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,

0x00,0x00,0xF8,0xFF,0xFF,0xFF,0x0F,0x1C,0x00,0x00,0x00,0x00,0x80,0x0F,0x00,0x00,

0x00,0x00,0xF0,0xFF,0xFF,0xFF,0x7F,0x1C,0x40,0x00,0x00,0x00,0x80,0x0F,0x00,0x00,

0x00,0x00,0xF8,0xFF,0xFF,0xFF,0xF7,0x1F,0x40,0x00,0x00,0x00,0x80,0x0F,0x00,0x00,

0x00,0x00,0xF0,0xFF,0xFF,0xFF,0x87,0x3F,0x60,0x00,0x00,0x00,0x80,0x07,0x00,0x00,

0x00,0x00,0xC0,0x0F,0x00,0x80,0x07,0x3E,0x20,0x00,0x00,0x00,0xC0,0x07,0x00,0x00,

0x00,0x00,0x80,0x0F,0x00,0x80,0x03,0xF8,0x20,0x00,0x00,0x00,0xC0,0x07,0x00,0x00,

0x00,0x00,0x80,0x0F,0x00,0x80,0x03,0xF0,0x33,0x00,0x00,0x00,0xE0,0x03,0x00,0x00,

0x00,0x00,0x00,0x1F,0x00,0x80,0x07,0xF0,0x1F,0x00,0x00,0x00,0xF0,0x01,0x00,0x00,

0x00,0x00,0x00,0x3E,0x00,0x80,0x07,0x70,0x7C,0x30,0x00,0x00,0xF0,0x01,0x00,0x00,

0x00,0x00,0x00,0x7C,0x00,0x80,0x07,0xE0,0xF8,0x7B,0x00,0x00,0xF8,0x00,0x00,0x00,

0x00,0x00,0x00,0xF8,0x00,0x80,0x07,0xE0,0x88,0xFF,0x00,0x00,0x7C,0x00,0x00,0x00,

0x00,0x00,0x00,0xF0,0x01,0x80,0x07,0xC0,0x09,0xFC,0x03,0x00,0x1F,0x00,0x00,0x00,

0x00,0x00,0x00,0xE0,0x07,0x80,0x07,0xC0,0x05,0xFC,0x07,0x80,0x0F,0x00,0x00,0x00,

0x00,0x00,0x00,0x80,0x1F,0x00,0x01,0xC0,0x07,0xFC,0x0F,0xE0,0x07,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x80,0x07,0xFE,0x3F,0xF0,0x01,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xFC,0x00,0x00,0x80,0x03,0x80,0xFF,0x7E,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xF0,0x07,0x00,0x80,0x03,0x00,0xF0,0x1F,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x03,0x00,0xF8,0x1F,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0xFC,0x03,0x00,0x01,0x80,0xFF,0x7C,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0xF0,0x7F,0x00,0x00,0xFE,0x1F,0xF0,0x01,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xFF,0x00,0x80,0x01,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x05,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,


};

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

second part:
Code:
static unsigned char logo2[] U8G_PROGMEM = {
  0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0xFF,0xFF,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0xFF,0xFF,0x07,0x00,0x38,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0xF8,0xFF,0x01,0x00,0xFC,0x7F,0x00,0x3F,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x80,0xFF,0x01,0x00,0x00,0x00,0xFF,0xC3,0x0F,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xE0,0x3F,0x00,0x00,0x00,0x00,0xF0,0xFF,0x01,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xFC,0xE3,0xFF,0x07,0x00,0xFE,0x9F,0xFF,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x7F,0xE0,0xFF,0x07,0x00,0xFE,0x8F,0xFF,0x03,0x00,0x00,0x00,

0x00,0x00,0x00,0xE0,0x0F,0x00,0x3E,0x00,0x00,0xE0,0xF0,0xE3,0x0F,0x00,0x00,0x00,

0x00,0x00,0x00,0xF0,0x03,0x00,0x3C,0x00,0x00,0x60,0xF8,0x80,0x3F,0x00,0x00,0x00,

0x00,0x00,0x00,0xFC,0x00,0x00,0x38,0x00,0x00,0xE0,0x3F,0x00,0x7E,0x00,0x00,0x00,

0x00,0x00,0x00,0x7E,0x00,0x00,0x38,0x00,0x00,0xE0,0x07,0x00,0xFC,0x01,0x00,0x00,

0x00,0x00,0x80,0x1F,0x00,0xE0,0x39,0x00,0x00,0xF8,0x01,0x00,0xF0,0x03,0x00,0x00,

0x00,0x00,0xC0,0x0F,0x00,0xE0,0x71,0x00,0x00,0x3E,0x00,0x00,0xE0,0x07,0x00,0x00,

0x00,0x00,0xE0,0x07,0x00,0xE0,0xF1,0x00,0xC0,0x3F,0x00,0x00,0xC0,0x0F,0x00,0x00,

0x00,0x00,0xE0,0x03,0x00,0xE0,0xF1,0x00,0xE0,0x1B,0x00,0x00,0x80,0x1F,0x00,0x00,

0x00,0x00,0xF8,0x01,0x00,0xE0,0xE1,0x00,0xF8,0x18,0x00,0x00,0x00,0x3F,0x00,0x00,

0x00,0x00,0xF8,0x00,0x00,0xE0,0xE1,0x01,0x1F,0x08,0x00,0x00,0x00,0x7E,0x00,0x00,

0x00,0x00,0x7C,0x00,0x00,0xE0,0xC1,0xE1,0x07,0x08,0x00,0x00,0x00,0xFC,0x00,0x00,

0x00,0x00,0x3E,0x00,0x00,0xE0,0xC1,0xF9,0x00,0x04,0x00,0x00,0x00,0xFC,0x00,0x00,

0x00,0x00,0x7E,0x00,0x00,0xE0,0xC1,0x3F,0x00,0x04,0x00,0x00,0x00,0xF8,0x01,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0xC1,0x0F,0x00,0x04,0x00,0x00,0x00,0xF8,0x01,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0xE1,0x07,0x00,0x06,0x00,0x00,0x00,0xF0,0x01,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0x00,0x02,0x00,0x00,0x00,0xF0,0x01,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0x0F,0x07,0x00,0x03,0x00,0x00,0x00,0xF0,0x03,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0x03,0x07,0x00,0x03,0x00,0x00,0x00,0xF0,0x03,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0x01,0x0F,0x00,0x01,0x00,0x00,0x00,0xF0,0x03,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0x07,0x0E,0x80,0x00,0x00,0x00,0x00,0xF0,0x03,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0x1F,0x1E,0x80,0x00,0x00,0x00,0x00,0xF0,0x03,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0x7F,0x1E,0x80,0x00,0x00,0x00,0x00,0xF0,0x01,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0xF1,0x1F,0xC0,0x00,0x00,0x00,0x00,0xF0,0x01,0x00,

0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0xC1,0x3F,0x40,0x00,0x00,0x00,0x00,0xF8,0x01,0x00,

0x00,0x00,0x7E,0x00,0x00,0xE0,0x01,0x7E,0x40,0x00,0x00,0x00,0x00,0xF8,0x00,0x00,

0x00,0x00,0x7C,0x00,0x00,0xE0,0x01,0xF8,0x60,0x00,0x00,0x00,0x00,0xFC,0x00,0x00,

0x00,0x00,0xFC,0x00,0x00,0xE0,0x01,0xF8,0x27,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,

0x00,0x00,0xF8,0x01,0x00,0xE0,0x01,0xF0,0x3F,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,

0x00,0x00,0xF0,0x01,0x00,0xE0,0x01,0x70,0xFC,0x60,0x00,0x00,0x00,0x3F,0x00,0x00,

0x00,0x00,0xF0,0x03,0x00,0xE0,0x01,0xF0,0xF8,0xE3,0x01,0x00,0x80,0x1F,0x00,0x00,

0x00,0x00,0xC0,0x0F,0x00,0xE0,0x01,0xE0,0x98,0xFF,0x03,0x00,0xC0,0x0F,0x00,0x00,

0x00,0x00,0xC0,0x1F,0x00,0xE0,0x01,0xE0,0x18,0xFE,0x07,0x00,0xE0,0x07,0x00,0x00,

0x00,0x00,0x00,0x3F,0x00,0xE0,0x01,0xE0,0x09,0xF8,0x0F,0x00,0xF0,0x03,0x00,0x00,

0x00,0x00,0x00,0xFE,0x00,0xE0,0x01,0xC0,0x0D,0xF8,0x3F,0x00,0xFC,0x01,0x00,0x00,

0x00,0x00,0x00,0xF8,0x03,0x00,0x00,0xC0,0x07,0xF8,0x7F,0x00,0x7E,0x00,0x00,0x00,

0x00,0x00,0x00,0xF0,0x07,0x00,0x00,0xC0,0x07,0xFC,0xFF,0x80,0x1F,0x00,0x00,0x00,

0x00,0x00,0x00,0xC0,0x1F,0x00,0x00,0x80,0x07,0x00,0xFF,0xE7,0x07,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x80,0x03,0x00,0xC0,0xFF,0x01,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xFC,0x07,0x00,0x00,0x03,0x00,0x80,0xFF,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0xE0,0x7F,0x00,0x00,0x03,0x00,0xF8,0xFF,0x03,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0xFF,0x07,0x00,0x01,0xE0,0xFF,0x81,0x0F,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0xF0,0xFF,0x67,0xE1,0xFF,0x1F,0x00,0x3E,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x38,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

3rd part:

Code:
static unsigned char logo3[] U8G_PROGMEM = {
0x00,0x00,0x00,0xC0,0xFF,0xFF,0x07,0x00,0x00,0x00,0xFF,0xFF,0x1F,0xF0,0x1F,0x00,

0x00,0x00,0x00,0xF8,0xFF,0x0F,0x00,0x00,0x00,0x00,0xC0,0xFF,0xFF,0xFC,0x07,0x00,

0x00,0x00,0x00,0xFF,0x7F,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0xFF,0xFF,0x01,0x00,

0x00,0x00,0xE0,0xFF,0x7F,0x00,0x00,0x00,0x00,0x80,0x03,0xFC,0xFF,0x7F,0x00,0x00,

0x00,0x00,0xF8,0xFF,0xF0,0xFF,0xFF,0x01,0x00,0xF0,0xFF,0x3F,0xFF,0x7F,0x00,0x00,

0x00,0x00,0xFE,0x1F,0xF0,0xFF,0xFF,0x01,0x00,0xF8,0xFF,0x1F,0xFF,0xFF,0x01,0x00,

0x00,0x80,0xFF,0x07,0x00,0xFE,0x0F,0x00,0x00,0x00,0xFF,0xC1,0xFF,0xFF,0x07,0x00,

0x00,0xE0,0xFF,0x00,0x00,0xF8,0x03,0x00,0x00,0x00,0x3C,0xE0,0x1F,0xFE,0x1F,0x00,

0x00,0xF8,0x3F,0x00,0x00,0xF0,0x03,0x00,0x00,0x00,0x38,0xFC,0x07,0xF8,0x7F,0x00,

0x00,0xFC,0x0F,0x00,0x00,0xF0,0x03,0x00,0x00,0x00,0x38,0xFF,0x00,0xE0,0xFF,0x00,

0x00,0xFF,0x07,0x00,0x00,0xE0,0x03,0x00,0x00,0x00,0xF8,0x3F,0x00,0x80,0xFF,0x03,

0x80,0xFF,0x01,0x00,0xE0,0xE3,0x07,0x00,0x00,0x00,0xFC,0x0F,0x00,0x00,0xFE,0x07,

0xC0,0xFF,0x00,0x00,0xE0,0xC7,0x07,0x00,0x00,0x00,0xFF,0x01,0x00,0x00,0xFC,0x1F,

0xE0,0x3F,0x00,0x00,0xE0,0xC7,0x07,0x00,0x00,0x80,0x7F,0x00,0x00,0x00,0xF8,0x3F,

0xF8,0x1F,0x00,0x00,0xE0,0xC7,0x0F,0x00,0x00,0xF0,0x0F,0x00,0x00,0x00,0xE0,0x7F,

0xFC,0x0F,0x00,0x00,0xE0,0x87,0x0F,0x00,0x00,0xFE,0x07,0x00,0x00,0x00,0xC0,0xFF,

0xFE,0x07,0x00,0x00,0xE0,0x87,0x0F,0x00,0x00,0xFF,0x07,0x00,0x00,0x00,0x80,0xFF,

0xFE,0x03,0x00,0x00,0xE0,0x87,0x1F,0x00,0xE0,0x1F,0x07,0x00,0x00,0x00,0x00,0xFF,

0xFF,0x01,0x00,0x00,0xE0,0x07,0x1F,0x00,0xF8,0x07,0x03,0x00,0x00,0x00,0x00,0xFE,

0xFF,0x00,0x00,0x00,0xE0,0x07,0x1F,0x00,0xFE,0x01,0x03,0x00,0x00,0x00,0x00,0xFC,

0x7F,0x00,0x00,0x00,0xE0,0x07,0x3E,0xE0,0x3F,0x80,0x03,0x00,0x00,0x00,0x00,0xF8,

0x3F,0x00,0x00,0x00,0xE0,0x07,0x3E,0xF8,0x0F,0x80,0x01,0x00,0x00,0x00,0x00,0xF8,

0x3F,0x00,0x00,0x00,0xE0,0x07,0x3E,0xFF,0x03,0xC0,0x01,0x00,0x00,0x00,0x00,0xF0,

0x3F,0x00,0x00,0x00,0xE0,0x07,0xFC,0x7F,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xF0,

0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0xFC,0x1F,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0xE0,

0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0xFE,0x03,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0xE0,

0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0xFF,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0xE7,0xFF,0x00,0x00,0x60,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF1,0x01,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xF0,0x01,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x80,

0xFF,0xFF,0xFF,0xFF,0xFF,0x0F,0xF0,0x03,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x80,

0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0xE0,0x03,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x80,

0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0xE0,0x03,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x80,

0xFF,0xFF,0xFF,0xFF,0xFF,0x7F,0xC0,0x07,0x00,0x1C,0x00,0x00,0x00,0x00,0x00,0x80,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,0x07,0x00,0x0C,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC3,0x0F,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0xF7,0x9F,0x0F,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0x87,0xFF,0x0F,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0xC0,

0xFF,0xFF,0xFF,0xFF,0xFF,0x07,0xFE,0x1F,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xE0,

0x7F,0x5D,0x55,0x5D,0xF5,0x07,0xF8,0x1F,0x00,0x07,0x00,0x00,0x00,0x00,0x00,0xE0,

0x3F,0x00,0x00,0x00,0xE0,0x07,0xC0,0x3F,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0xE0,

0x3F,0x00,0x00,0x00,0xE0,0x07,0x00,0xFF,0x81,0x03,0x00,0x00,0x00,0x00,0x00,0xF0,

0x7F,0x00,0x00,0x00,0xE0,0x07,0x00,0xFE,0x87,0x03,0x00,0x00,0x00,0x00,0x00,0xF8,

0xFF,0x00,0x00,0x00,0xE0,0x07,0x00,0xFE,0x9F,0x01,0x00,0x00,0x00,0x00,0x00,0xF8,

0xFF,0x00,0x00,0x00,0xE0,0x07,0x00,0xFE,0xFF,0x01,0x08,0x00,0x00,0x00,0x00,0xFC,

0xFF,0x01,0x00,0x00,0xE0,0x07,0x00,0x7C,0xFE,0x07,0x18,0x00,0x00,0x00,0x00,0xFE,

0xFF,0x03,0x00,0x00,0xE0,0x07,0x00,0xFC,0xF0,0x1F,0x7C,0x00,0x00,0x00,0x00,0xFF,

0xFC,0x07,0x00,0x00,0xE0,0x07,0x00,0xF8,0xE0,0x7F,0xFC,0x00,0x00,0x00,0x80,0xFF,

0xFC,0x0F,0x00,0x00,0xE0,0x07,0x00,0xF8,0xE0,0xFF,0xFF,0x01,0x00,0x00,0xC0,0xFF,

0xF8,0x1F,0x00,0x00,0xE0,0x07,0x00,0xF8,0x71,0xF8,0xFF,0x07,0x00,0x00,0xE0,0x7F,

0xF0,0x7F,0x00,0x00,0xE0,0x07,0x00,0xF0,0x71,0xE0,0xFF,0x0F,0x00,0x00,0xF0,0x3F,

0xC0,0xFF,0x00,0x00,0xE0,0x07,0x00,0xF0,0x31,0x00,0xFF,0x1F,0x00,0x00,0xFC,0x1F,

0x80,0xFF,0x03,0x00,0xE0,0x07,0x00,0xF0,0x3B,0x00,0xFF,0x3F,0x00,0x00,0xFE,0x07,

0x00,0xFF,0x07,0x00,0xE0,0x07,0x00,0xE0,0x1B,0x80,0xFF,0x7F,0x00,0x80,0xFF,0x03,

0x00,0xFC,0x1F,0x00,0xE0,0x03,0x00,0xE0,0x1F,0x80,0xFF,0xFF,0x01,0xF0,0xFF,0x00,

0x00,0xF8,0x7F,0x00,0x00,0x00,0x00,0xE0,0x1F,0x80,0xFF,0xFF,0x03,0xF8,0x7F,0x00,

0x00,0xE0,0xFF,0x01,0x00,0x00,0x00,0xC0,0x0F,0x80,0xFF,0xFF,0x0F,0xFE,0x1F,0x00,

0x00,0x80,0xFF,0x0F,0x00,0x00,0x00,0xC0,0x0F,0x00,0xF0,0xFF,0xFF,0xFF,0x07,0x00,

0x00,0x00,0xFE,0x3F,0x00,0x00,0x00,0xC0,0x0F,0x00,0x00,0xF0,0xFF,0xFF,0x01,0x00,

0x00,0x00,0xF8,0xFF,0x03,0x00,0x00,0x80,0x07,0x00,0x00,0x00,0xFF,0x7F,0x00,0x00,

0x00,0x00,0xE0,0xFF,0x1F,0x00,0x00,0x80,0x07,0x00,0x00,0xC0,0xFF,0x3F,0x00,0x00,

0x00,0x00,0x00,0xFF,0x7F,0x00,0x00,0x00,0x03,0x00,0x00,0xFC,0xFF,0xFF,0x00,0x00,

0x00,0x00,0x00,0xFC,0xFF,0x1F,0x00,0x00,0x03,0x00,0xE0,0xFF,0x7F,0xFE,0x03,0x00,

};

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

4th:
Code:
static unsigned char logo4[] U8G_PROGMEM = {
  0x80,0xFF,0x3F,0xE0,0xFF,0x01,0x00,0x00,0x00,0xF0,0xFF,0xFF,0xFF,0x00,0x00,0x00,

0x80,0xFF,0x3F,0xE0,0xFF,0x01,0x00,0x00,0x00,0xFC,0xFF,0x7F,0xFF,0x00,0x00,0x00,

0x80,0xFF,0x3F,0xE0,0xFF,0x03,0x00,0x00,0x80,0xFF,0xFF,0x1F,0xFF,0x00,0x00,0x00,

0x80,0xFF,0x3F,0xC0,0xFF,0x03,0x00,0x00,0xE0,0xFF,0xFF,0x07,0x7F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0xC0,0xFF,0x03,0x00,0x00,0xF8,0xFF,0xFF,0x00,0x7F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0xC0,0xFF,0x03,0x00,0x00,0xFE,0xFF,0x3F,0x80,0x7F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x80,0xFF,0x07,0x00,0xC0,0xFF,0xFF,0x0F,0x80,0x3F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x80,0xFF,0x07,0x00,0xF0,0xFF,0xFF,0x01,0x80,0x3F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0xFF,0x0F,0x00,0xFE,0xFF,0x7F,0x00,0xC0,0x1F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0xFF,0x0F,0x80,0xFF,0xFF,0x0F,0x00,0xC0,0x1F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0xFF,0x0F,0xE0,0xFF,0xFF,0x03,0x00,0xE0,0x1F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0xFF,0x1F,0xFC,0xFF,0xFF,0x00,0x00,0xE0,0x0F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0xFE,0x1F,0xFF,0xFF,0x1F,0x00,0x00,0xE0,0x0F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0xFE,0xFF,0xFF,0xFF,0x07,0x00,0x00,0xE0,0x0F,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0xFC,0xFF,0xFF,0xFF,0x01,0x00,0x00,0xF0,0x07,0x00,0x00,0x00,

0xC0,0xFF,0x3F,0x00,0xFC,0xFF,0xFF,0x3F,0x00,0x00,0x00,0xF0,0x07,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x00,0xFC,0xFF,0xFF,0x0F,0x00,0x00,0x00,0xF8,0x03,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x00,0xF8,0xFF,0xFF,0x03,0x00,0x00,0x00,0xF8,0x03,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x00,0xFE,0xFF,0x7F,0x00,0x00,0x00,0x00,0xF8,0x03,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x80,0xFF,0xFF,0x1F,0x00,0x00,0x00,0x00,0xFC,0x01,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0xE0,0xFF,0xFF,0x07,0x00,0x00,0x00,0x00,0xFC,0x01,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0xF8,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0xFC,0x01,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x03,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xCF,0xFF,0x03,0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xC3,0xFF,0x03,0x00,0x00,0x00,0x80,0x7F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0x80,0xFF,0x07,0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0x1F,0x80,0xFF,0x07,0x00,0x00,0x00,0x80,0x3F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0x07,0x80,0xFF,0x0F,0x00,0x00,0x00,0xC0,0x1F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0x01,0x00,0xFF,0x0F,0x00,0x00,0x00,0xC0,0x1F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x00,0x00,0xFF,0x0F,0x00,0x00,0x00,0xC0,0x1F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x00,0x00,0xFF,0x1F,0x00,0x00,0x00,0xE0,0x0F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0x00,0x00,0xFE,0x1F,0x00,0x00,0x00,0xE0,0x0F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0x03,0x00,0xFE,0x1F,0x00,0x00,0x00,0xF0,0x0F,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0x0F,0x00,0xFC,0x3F,0x00,0x00,0x00,0xF0,0x07,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0x7F,0x00,0xFC,0x3F,0x00,0x00,0x00,0xF0,0x07,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0x01,0xFC,0x3F,0x00,0x00,0x00,0xF8,0x03,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0x07,0xFC,0x7F,0x00,0x00,0x00,0xF8,0x03,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0x3F,0xF8,0x7F,0x00,0x00,0x00,0xF8,0x03,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x7F,0x00,0x00,0x00,0xFC,0x01,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFB,0xFF,0x00,0x00,0x00,0xFC,0x01,0x00,0x00,0x00,0x00,

0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0xFC,0x01,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0xFF,0xFF,0xFF,0xFF,0x01,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0xFC,0xFF,0xFF,0xFF,0x01,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0xF0,0xFF,0xFF,0xFF,0x01,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x80,0xFF,0xFF,0xFF,0x03,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x00,0xFE,0xFF,0xFF,0x03,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00,

0xFF,0xFF,0x3F,0x00,0xF8,0xFF,0xFF,0x07,0x00,0x80,0x7F,0x00,0x00,0x00,0x00,0x00,

0xC0,0xFF,0x3F,0x00,0xC0,0xFF,0xFF,0x1F,0x00,0x80,0x3F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0xFF,0xFF,0x7F,0x00,0x80,0x3F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0xF8,0xFF,0xFF,0x01,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0xE0,0xFF,0xFF,0x0F,0xC0,0x1F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFF,0xFF,0x3F,0xE0,0x1F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xE0,0x0F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xE7,0x0F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xFF,0x0F,0x00,0x00,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFE,0xFF,0xFF,0xFF,0x07,0x00,0xC0,0x00,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFC,0xFF,0xFF,0xFF,0x07,0x00,0xC0,0x01,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFC,0xFF,0xFF,0xFF,0x0F,0x00,0xE0,0x07,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xFC,0x7F,0xFF,0xFF,0x7F,0x00,0xE0,0x0F,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xF8,0x7F,0xFC,0xFF,0xFF,0x01,0xF0,0x1F,0x00,0x00,

0x80,0xFF,0x3F,0x00,0x00,0x00,0xF8,0x7F,0xF0,0xFF,0xFF,0x07,0xF0,0x7F,0x00,0x00,

};



Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

5th:

Code:
void draw(void) {
    u8g.setColorIndex(1);
  // graphic commands to redraw the complete screen should be placed here  
  u8g.setFont(u8g_font_unifont);
  u8g.setFont(u8g_font_u8glib_4);
}

  void draw1(void) {  
 u8g.drawXBMP( x, y, width, height, logo1);  
}

  void draw2(void) {
 u8g.drawXBMP( x, y, width, height, logo2);  
}
  void draw3(void) {
 u8g.drawXBMP( x, y, width, height, logo3);  
}
  void draw4(void) {
 u8g.drawXBMP( x, y, width, height, logo4);  
}

void draw5(void) {
  u8g.setColorIndex(0);
 u8g.drawBox( 0, 0, 128, 64);
}

long readVcc() {
  long result;
  // Read 1.1V reference against AVcc
  ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1);
  delay(2); // Wait for Vref to settle
  ADCSRA |= _BV(ADSC); // Convert
  while (bit_is_set(ADCSRA,ADSC));
  result = ADCL;
  result |= ADCH<<8;
  result = 1126400L / result; // Back-calculate AVcc in mV
  return result;
}

void wakeUp()
{
    // Just a handler for the pin interrupt.
}

void uiSetup(void) {
  // configure input keys
  
  pinMode(uiKeyPrev, INPUT);                // set pin to input
  
  pinMode(uiKeyNext, INPUT);                // set pin to input
  
  pinMode(uiKeySelect, INPUT);              // set pin to input
  
  pinMode(uiKeyBack, INPUT);                // set pin to input
  
}

void uiStep(void) {
  uiKeyCodeSecond = uiKeyCodeFirst;
  if ( key>=450 && key<550 )
    uiKeyCodeFirst = KEY_PREV;
  else if ( key>=870 && key<960 )
    uiKeyCodeFirst = KEY_NEXT;
  else if ( key>=970 && key<1050 )
    uiKeyCodeFirst = KEY_SELECT;
  else if ( key>=270 && key<330 )
    uiKeyCodeFirst = KEY_BACK;
  else
    uiKeyCodeFirst = KEY_NONE;
  
  if ( uiKeyCodeSecond == uiKeyCodeFirst )
    uiKeyCode = uiKeyCodeFirst;
  else
    uiKeyCode = KEY_NONE;
}


#define MENU_ITEMS 6
char *menu_strings[MENU_ITEMS] = { "Spider Control", "Area Map", "Sensors", "Manipulators", "Video Surveilance", "System Info" };

uint8_t menu_current = 0;
uint8_t menu_redraw_required = 0;
uint8_t last_key_code = KEY_NONE;


void drawMenu(void) {
        u8g.firstPage();
    do  {
  uint8_t i, h;
  u8g_uint_t w, d;

  u8g.setFont(u8g_font_6x12);
  u8g.setFontRefHeightText();
  u8g.setFontPosTop();
  
  h = u8g.getFontAscent()-u8g.getFontDescent();
  w = u8g.getWidth();
  for( i = 0; i < MENU_ITEMS; i++ ) {
    d = (w-u8g.getStrWidth(menu_strings[i]))/2;
    u8g.setDefaultForegroundColor();
    if ( i == menu_current ) {
      u8g.drawBox(0, i*h+1, w, h);
      u8g.setDefaultBackgroundColor();
    }
    u8g.drawStr(d, i*h, menu_strings[i]);
  }
      } while( u8g.nextPage() );
    menu_redraw_required = 0;
}

void drawSpiderControl (void) {
  
         u8g.firstPage();
     do {  
  u8g.setColorIndex(1);
  // graphic commands to redraw the complete screen should be placed here  
  u8g.setFont(u8g_font_unifont);
  u8g.setFont(u8g_font_u8glib_4);
  
  //Serial.begin(9600);
  potValue = analogRead(potPin)/4; //Read the potentiometer, convert it to 0 - 255
  if(potValue>255){
    potValue = 255;
  }
  else if(potValue<10){
    potValue = 10;
  }
  //Serial.println(potValue);
  analogWrite(LEDPin, potValue); //Write the converted potentiometer value to LED pin
  
  val1 = analogRead(A1);
  val1 = map(val1, 0, 1023, 0, 179);
  vals[0] = val1;
  //Serial.println(val1);
  val2 = analogRead(A2);
  val2 = map(val2, 0, 1023, 0, 179);
  vals[1] = val2;
  //Serial.println(val2);
  //unsigned long time2 = 0;
  
  Mirf.setTADDR((byte *)"serv1");
  Mirf.send((byte *) &vals);
  while(Mirf.isSending()){
  }
  
  if(Mirf.dataReady()){
  time2 = millis();
  //Serial.print("time2:");
  //Serial.println(time2);
  }
  time1 = millis();
  //Serial.print("time1:");
  //Serial.println(time1);
  
  delayReply = (time1-time2);
  //Serial.print("delay:");
  // Serial.println(delayReply);
  
  Mirf.getData((byte *) &sens);
  
 
    //unsigned long currentMillis = millis();
//if(currentMillis - previousMillis > interval){
  //previousMillis = currentMillis;
  
  
      if (delayReply < 50 ) {
      u8g.drawBox(7, 4, 2, 1);
      u8g.drawBox(10, 3, 2, 2);
      u8g.drawBox(13, 2, 2, 3);
      u8g.drawBox(16, 1, 2, 4);
      u8g.drawBox(19, 0, 2, 5);
      u8g.drawStr( 22, 5, "G");
      }
      
      else if ( 50 <= delayReply &&  delayReply < 100 ) {                                
      
      u8g.drawBox(7, 4, 2, 1);
      u8g.drawBox(10, 3, 2, 2);
      u8g.drawBox(13, 2, 2, 3);
      u8g.drawBox(16, 1, 2, 4);
      u8g.drawBox(19, 0, 2, 5);
      }
      
       else if ( 100 <= delayReply && delayReply < 200 ) {
      
      u8g.drawBox(7, 4, 2, 1);
      u8g.drawBox(10, 3, 2, 2);
      u8g.drawBox(13, 2, 2, 3);
      u8g.drawBox(16, 1, 2, 4);
      }
      
      else if ( 200 <= delayReply && delayReply < 400 ) {
      
      u8g.drawBox(7, 4, 2, 1);
      u8g.drawBox(10, 3, 2, 2);
      u8g.drawBox(13, 2, 2, 3);
      }
      
      else if ( 400 <= delayReply && delayReply < 600 ) {
      
      u8g.drawBox(7, 4, 2, 1);
      u8g.drawBox(10, 3, 2, 2);
      }
      
      else if ( 600 <= delayReply && delayReply < 800 ){
      
      u8g.drawBox(7, 4, 2, 1);
      }
      
      if (delayReply >= 800 ){
        u8g.drawStr( 8, 4, "lost sig!");
      }
//}

    u8g.drawStr( 45, 4, "My Joy_V1.0");
    u8g.drawStr( 24, 12, "JoyStick Pos");
    u8g.drawStr( 90, 12, "Spider");
    
    
    u8g.drawLine(3, 0, 3, 4);    //Anntena
    u8g.drawLine(2, 2, 0, 0);
    u8g.drawLine(4, 2, 6, 0);
    //u8g.drawFrame(13, 6, 115, 58);   //Menu Frame
    //u8g.drawLine(76, 6, 76, 63);
    
    u8g.drawStr( 69, 42, "x");
    u8g.drawLine (15, 35, 74, 35);   // X axel
    u8g.drawLine (16, 36, 18, 37);
    u8g.drawLine (16, 34, 18, 33);
    u8g.drawLine (73, 36, 71, 37);
    u8g.drawLine (73, 34, 71, 33);  
    
    u8g.drawStr( 49, 18, "y");
    u8g.drawLine (45, 13, 45, 61);   //Y axel
    u8g.drawLine (46, 14, 47, 16);
    u8g.drawLine (44, 14, 43, 16);
    u8g.drawLine (46, 60, 47, 58);
    u8g.drawLine (44, 60, 43, 58);
    
  //Serial.begin (9600);                    // Servo Position on coordinates
  PosX = analogRead(A1);
  PosX = map(PosX, 0, 1023, 0, 35);
  //Serial.println(PosX);
  PosY = analogRead(A2);
  PosY = map(PosY, 0, 1023, 0, 35);
  //Serial.println(PosY);
  u8g.drawFrame(PosX+28, PosY+18, 3, 3);
 
  u8g.setPrintPos(80,23);
  u8g.print("H Servo:");
  u8g.setPrintPos(113,23);
  u8g.print(sens[0]);
  u8g.setPrintPos(80,28);
  u8g.print("V Servo:");
  u8g.setPrintPos(113,28);
  u8g.print(sens[1]);
  
  u8g.setPrintPos(80,33);    //  Humidity data
  u8g.print("Hum(%): ");
  u8g.setPrintPos(113,33);
  u8g.print((float)sens[2]);
  u8g.setPrintPos(80,38);
  u8g.print("Temp C*: ");     //Temperature Sensor's readings
  u8g.setPrintPos(113,38);
  u8g.print(sens[3]);
  
  u8g.setPrintPos(80,43);
  u8g.print("Voltage: ");
  u8g.setPrintPos(113,43);
  float voltage = analogRead(batCheck);    //voltmeter
  //Serial.begin(9600);
  voltage = map(voltage,0,1023,0,1008);
  //Serial.println(voltage);
  u8g.print(voltage/100);
  u8g.setPrintPos(113,48);                   //Arduino Voltage
  u8g.print( (float) readVcc()/1000);
  
  
  u8g.drawLine(100, 0, 125, 0);    // Battery Bar
  u8g.drawLine(100, 5, 125, 5);
  u8g.drawLine(100, 0, 100, 5);
  u8g.drawLine(125, 0, 125, 1);
  u8g.drawLine(125, 1, 127, 1);
  u8g.drawLine(127, 1, 127, 4);
  u8g.drawLine(127, 4, 125, 4);
  u8g.drawLine(125, 4, 125, 5);
  
  int battery = voltage;
  battery = map( battery, 670, 820, 0, 27);
  u8g.drawBox(101, 1, battery, 4);
  
  
  if( voltage <660)
  {
   u8g.setColorIndex(0);
    u8g.drawBox(0, 0, 128, 64);
    u8g.setColorIndex(1);
    u8g.drawFrame(0, 0, 128, 64);
     u8g.setPrintPos(37,35);
     u8g.print("LOW BATTERY !!!");
     //u8g.setColorIndex(0);
     //u8g.print("LOW BATTERY !!!");
     //u8g.setColorIndex(1);
     //u8g.print("5sec..");
     /*
     digitalWrite(lcdbl, LOW);
     delay(5000);
    attachInterrupt(0, wakeUp, LOW);
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
    detachInterrupt(0);
    digitalWrite(lcdbl, HIGH);
    */

    }
  
 
  }
  while( u8g.nextPage() );
  //delay(20);
  
}

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 25
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

wooffff, last part:

Code:
void updateMenu(void) {
  if ( uiKeyCode != KEY_NONE && last_key_code == uiKeyCode ) {
    return;
  }
  last_key_code = uiKeyCode;
  
  switch ( uiKeyCode ) {
    case KEY_NEXT:
      menu_current++;
      if ( menu_current >= MENU_ITEMS )
        menu_current = 0;
      menu_redraw_required = 1;
      break;
    case KEY_PREV:
      if ( menu_current == 0 )
        menu_current = MENU_ITEMS;
      menu_current--;
      menu_redraw_required = 1;
      break;
  }
}

void backlit(void){
  //Serial.begin(9600);
key = analogRead(A3);
//Serial.println(key);

  potValue = analogRead(potPin)/4;              //Read the potentiometer, convert it to 0 - 255
  if(potValue>255){
    potValue = 255;
  }
  else if(potValue<10){
    potValue = 10;
  }
  //Serial.println(potValue);
  analogWrite(LEDPin, potValue);                //Write the converted potentiometer value to LED pin
}


void setup() {
  Serial.begin(9600);
  // rotate screen, if required
  // u8g.setRot180();
  uiSetup();                                    // setup key detection and debounce algorithm
  menu_redraw_required = 1;                     // force initial redraw
  
if ( u8g.getMode() == U8G_MODE_R3G3B2 )
    u8g.setColorIndex(255);     // white
  else if ( u8g.getMode() == U8G_MODE_GRAY2BIT )
    u8g.setColorIndex(3);         // max intensity
  else if ( u8g.getMode() == U8G_MODE_BW )
    u8g.setColorIndex(1);         // pixel on
    
  Mirf.spi = &MirfHardwareSpi;
  Mirf.init();
  Mirf.setRADDR((byte *)"clie1");
  Mirf.payload = sizeof(vals);
  Mirf.config();
  
    pinMode(LEDPin, OUTPUT); //Set Pin 6 as an Output
  potValue = analogRead(potPin)/4; //Read the potentiometer, convert it to 0 - 255
  if(potValue>255){
    potValue = 255;
  }
  else if(potValue<10){
    potValue = 10;
  }
  //Serial.println(potValue);
  analogWrite(LEDPin, potValue); //Write the converted potentiometer value to LED pin
  
   u8g.firstPage();  
  do { draw();
  u8g.setFont(u8g_font_courB12r);
  //u8g.setFont(u8g_font_u8glib_4);  
  u8g.drawStr( 25, 39, "VOLTRANS");
}
  while( u8g.nextPage() );
  delay(1000);
  
    u8g.firstPage();  
  do { draw1(); }
  while( u8g.nextPage() );
  delay(10);
  
    u8g.firstPage();  
  do { draw2(); }
  while( u8g.nextPage() );
  delay(10);
  
    u8g.firstPage();  
  do { draw3(); }
  while( u8g.nextPage() );
  delay(10);
  
    u8g.firstPage();  
  do { draw4(); }
  while( u8g.nextPage() );
  delay(10);

 u8g.firstPage();  
  do { draw5(); }
  while( u8g.nextPage() );
  delay(10);

u8g.firstPage();  
  do { draw(); }
  while( u8g.nextPage() );
  delay(1000);

  u8g.firstPage();  
  do { draw();
  u8g.setFont(u8g_font_unifont);
  u8g.setFont(u8g_font_u8glib_4);
  u8g.drawStr( 15, 35, "AN AZERBAIJAN COMPANY");
}
  while( u8g.nextPage() );
  delay(1000);

u8g.firstPage();  
  do { draw();
 
}
  while( u8g.nextPage() );

}

void loop() {
  
  backlit();                                     //initiate backlit control
  
  uiStep();                                     // check for key press

 
    if ( menu_redraw_required != 0 ){

      drawMenu();
    }
     updateMenu();                                 // update menu bar

          if ( menu_current == 0 &&  (analogRead(A3) > 1000) )
       {      
           do{
             drawSpiderControl();
             Serial.println(uiKeyCode);
           }while(analogRead(A3) <200);
          
           drawMenu();
       }
      
    
          
            
delay(10);

}
Logged

Sydney, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1273
Big things come in large packages
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You can attach files to a post. Look in the additional options at the bottom of the text entry box
Logged

Arduino libraries http://arduinocode.codeplex.com
Parola hardware & library http://parola.codeplex.com

Germany
Offline Offline
Edison Member
*
Karma: 136
Posts: 1491
If you believe something is right, you won't see what's wrong (David Straker).
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

First you need to learn how to use the SD library (SD.h or SdFat.h)
Then you need a procedure which loads a file into RAM area. Then display the bitmap from RAM instead ROM (use u8g_DrawXBM instead of u8g_DrawXBMP for example)

Oliver
Logged

Pages: [1]   Go Up
Jump to: