Show Posts
Pages: [1] 2
1  Using Arduino / Sensors / Re: Monitoring AC Current with Arduino and ACS712 on: September 17, 2014, 11:52:35 am
Any update on the thread?
I have the same 0,043-0,56A sensing when nothing is hooked up to the sensor.
2  Using Arduino / Networking, Protocols, and Devices / Re: Password protect my Ethernet Web Server - SOLVED on: April 24, 2014, 12:26:36 pm
Cool, currently trying to adapt your method to my little project on home automatisation, will post results here.
Thanks for idea!
3  Using Arduino / Sensors / Re: Monitoring AC Current with Arduino and ACS712 on: October 10, 2013, 01:03:08 pm
Variable, autoadjusted zero voltage one could be like this?
Code:
const int currentPin = 4;
const unsigned long sampleTime = 100000UL;                           // sample over 100ms, it is an exact number of cycles for both 50Hz and 60Hz mains
const unsigned long numSamples = 250UL;                               // choose the number of samples to divide sampleTime exactly, but low enough for the ADC to keep up
const unsigned long sampleInterval = sampleTime/numSamples;  // the sampling interval, must be longer than then ADC conversion time
//const int adc_zero = 522;                                                     // relative digital zero of the arudino input from ACS712 (could make this a variable and auto-adjust it)
int adc_zero;                                                                   //autoadjusted relative digital zero

void setup()
{
  Serial.begin(9600);
   adc_zero = determineVQ(currentPin); //Quiscent output voltage - the average voltage ACS712 shows with no load (0 A)
  delay(1000);
}

void loop(){
  Serial.print("ACS712@A2:");Serial.print(readCurrent(currentPin),3);Serial.println(" mA");
  delay(150);
}

int determineVQ(int PIN) {
  Serial.print("estimating avg. quiscent voltage:");
  long VQ = 0;
  //read 5000 samples to stabilise value
  for (int i=0; i<5000; i++) {
    VQ += analogRead(PIN);
    delay(1);//depends on sampling (on filter capacitor), can be 1/80000 (80kHz) max.
  }
  VQ /= 5000;
  Serial.print(map(VQ, 0, 1023, 0, 5000));Serial.println(" mV");
  return int(VQ);
}

float readCurrent(int PIN)
{
  unsigned long currentAcc = 0;
  unsigned int count = 0;
  unsigned long prevMicros = micros() - sampleInterval ;
  while (count < numSamples)
  {
    if (micros() - prevMicros >= sampleInterval)
    {
      int adc_raw = analogRead(currentPin) - adc_zero;
      currentAcc += (unsigned long)(adc_raw * adc_raw);
      ++count;
      prevMicros += sampleInterval;
    }
  }
  float rms = sqrt((float)currentAcc/(float)numSamples) * (75.7576 / 1024.0);
  return rms;
  //Serial.println(rms);
}
4  Using Arduino / Displays / Re: Arteffects! 128x64 LCD ST7920 on: January 26, 2013, 03:37:40 am
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);

}
5  Using Arduino / Displays / Re: Arteffects! 128x64 LCD ST7920 on: January 26, 2013, 03:37:12 am
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);
  
}

6  Using Arduino / Displays / Re: Arteffects! 128x64 LCD ST7920 on: January 26, 2013, 03:36:02 am
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,

};



7  Using Arduino / Displays / Re: Arteffects! 128x64 LCD ST7920 on: January 26, 2013, 03:35:08 am
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,

};

8  Using Arduino / Displays / Re: Arteffects! 128x64 LCD ST7920 on: January 26, 2013, 03:34:12 am
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,
};


9  Using Arduino / Displays / Re: Arteffects! 128x64 LCD ST7920 on: January 26, 2013, 03:31:20 am
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,


};

10  Using Arduino / Networking, Protocols, and Devices / Re: Controlling two servos over nRF24l01+ on: January 19, 2013, 03:15:30 pm
Well do not know how yet, but I want to hook up all through Arduino boards (brain of the system) I have analog tiny camera with microphone, actually this camera has built-in 2.4Ghz transmitter too, so this is going to be on my robot and receiver will display video on the joypad (I'll equipt 2nd version with 262K 3.2'' color screen with touch control. Do not know if Arduino MEGA 2650 will be powerfull enough to handle streaming, but this is an idea.
11  Using Arduino / Networking, Protocols, and Devices / Re: Controlling two servos over nRF24l01+ on: January 17, 2013, 10:37:37 am
Finally, Battery level is callibrated, sleep mode activated (when on power usage is around 60mA and in sleep mode around 10mA, still a lot, but I'll think about relay switch to completely isolate batteries from unit).Today I fixed Signal Bar, so this is not just picture displayed on the screen. Took whole day to figure out algorithm and redo the code to get it working!
Here is it:
Transmitter sends signal, receiver receives it, then after reading sensors, sending the row of values back to the receiver. On the receiver I've arranged 2 time measurements, one - time1 to read lost signal (packet has not being received) and time unit is up, difference will give me idea how long interruption occure, based on set timeframe boxes will appear on the signal bar, full 6 boxes and G letter, which means that the signal is strong and there were no interruption and lowest, when there are no replies for 1 second (1000 milliseconds) will indicate Lost Signal! mark next to the antenna on the screen. Well I do not know how else I can indicate signal other than that? any ideas will be highly appreciated.
Right now it looks like OK, when I go to the next room, where signal is not so strong, signal bar starts playing around, only the issue I can see is fluctuations are not smooth, but I think it's because of instant reading, if I set local delay I guess it'll get better something like this:
Code:
unsigned long currentMillis = millis();
if(currentMillis - previousMillis > interval){
  previousMillis = currentMillis;

not to read and display signal level every loop, but maybe once in the 30sec?

Other thing is, I used nRF24L01 module, but do not really appreciate it's signal strength, it's quite short, what is available to rather increase the distance or any known replacement would be highly appreciated?
Who can suggest? I need something stronger to have control over couple kilometers around!

Other question would be, can I use theese modules to transmit clear voice and videostream?

here is the whole code of transmitter:

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);  

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

int val1;
int val2;
int PosX;
int PosY;
int lcdbl = 9;
const int wakeUpPin = 9;
unsigned long time1;
unsigned long time2;
unsigned long delayReply;
int SignalBar;


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 draw(void) {
  // graphic commands to redraw the complete screen should be placed here  
  u8g.setFont(u8g_font_unifont);
  u8g.setFont(u8g_font_u8glib_4);
}
void wakeUp()
{
    // Just a handler for the pin interrupt.
}

// Arduino master setup
void setup(void) {
  

  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(lcdbl, OUTPUT);
}

void loop(void) {
  
     u8g.firstPage();  
  do {
draw();
  
  //Serial.begin(9600);

  digitalWrite(lcdbl, HIGH);
  
  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;
  */
    //Serial.println("Waiting for Respond:");
    //delayReply = (time2-time1);  
    //Serial.println(delayReply);

    
    
    // Signal Bar
    //var 1:
      
      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(A4);    //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);
  
  int battery = voltage;
  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);
  
  battery = map( battery, 670, 820, 0, 27);
  u8g.drawBox(101, 1, battery, 4);
  
  if( voltage <660)
  {
    pinMode(wakeUpPin, INPUT);
    u8g.drawFrame(0, 0, 128, 64);
     u8g.setColorIndex(3);
     u8g.setPrintPos(37,35);
     u8g.print("LOW BATTERY !!!");
     delay(5000);
     digitalWrite(lcdbl, LOW);
     delay(5000);
    attachInterrupt(0, wakeUp, LOW);
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
    detachInterrupt(0);
    digitalWrite(lcdbl, HIGH);
  }

//Serial.begin(9600);
//Serial.println("Start Receiving Data from Spider:");

//Serial.println(sens[2]);
//Serial.println(sens[3]);
//Serial.println(sens[4]);
//Serial.println(sens[5]);
//Serial.println(sens[6]);
//Serial.println(sens[7]);
delay(40);
  } while( u8g.nextPage() );
  
  // rebuild the picture after some delay
 
    }

12  Using Arduino / Displays / Re: Arteffects! 128x64 LCD ST7920 on: January 16, 2013, 06:00:26 pm
:-)

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.
13  Using Arduino / Displays / Arteffects! 128x64 LCD ST7920 on: January 16, 2013, 02:47:03 pm
Did anyone experiense arteffects using 128x64 LCD screen on ST7920 chipset?

Screen connected serial, using U8glib library!
14  Using Arduino / Networking, Protocols, and Devices / Re: Controlling two servos over nRF24l01+ on: January 16, 2013, 02:01:40 pm
And Beast
15  Using Arduino / Networking, Protocols, and Devices / Re: Controlling two servos over nRF24l01+ on: January 16, 2013, 01:59:46 pm
So few more steps behind!

I got NRF24L01+ modules to communicate to each other, send receive required arrays of data, to control servos and few more bits and pieces.

Project I'm working at the moment is to control ROV and receive data from it's sensors.

I also attached LCD screen to the receiver and make it to display battery bar, I had to spend a day or so to figure out why Arduino cant show fluctuations in power supply and found that source of power actualy was feeding the resistor divider, there for relative change in voltage were sending the same resut back to the analog read pin, did a lot of research and finally found the issue. It was not that easy, because the prototyping board was so overloaded with wires, could not figure out at the end what is connected wrong!
As they say : "If it does not look good, probably it's not good ))))"

Now I need a help from forum and Arduino experts to suggest the way to fix Radio Signal indicator bar, at the moment it's just picture, but I need to get it working, principle might be the following: Transmitter sends signal, then listens to the reply from the receiver, if receiver reply received within certain time frame, then it's reflected on the signal bar, if time is long, signal bar is small, which means packet rather were not received or it took several commands to be sent before receiver finally received and replied. Not sure if I'm on the right path, as I'm not subject expert and this is my first project, but quite abitious!

Here is the code of the transmitter, which needs to be completed:
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); 

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

int val1;
int val2;
int PosX;
int PosY;
int lcdbl = 9;

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 draw(void) {
  // graphic commands to redraw the complete screen should be placed here 
  u8g.setFont(u8g_font_unifont);
  u8g.setFont(u8g_font_u8glib_4);
}

// Arduino master setup
void setup(void) {
 

  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(lcdbl, OUTPUT);
}

void loop(void) {
  //Serial.begin(9600);
  digitalWrite(lcdbl, HIGH);
 
  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);
 
  Mirf.setTADDR((byte *)"serv1");
  Mirf.send((byte *) &vals);
  while(Mirf.isSending()){
  }
 
  while(!Mirf.dataReady()){
    //Serial.println("Waiting for Respond:");
    if ( millis() > 1000 ) {
      //Serial.println("Timeout on response from server!");
      return;
    }
  }
 
  Mirf.getData((byte *) &sens);
 
  u8g.firstPage(); 
  do {
draw();
   
    u8g.drawStr( 30, 4, "LCD Joystick_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.drawBox(7, 4, 2, 1);      // Signal Bar
    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.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);
  u8g.print("Hum(%): ");
  u8g.setPrintPos(113,33);
  u8g.print((float)sens[2]);
  u8g.setPrintPos(80,38);
  u8g.print("Temp C*: ");
  u8g.setPrintPos(113,38);
  u8g.print(sens[3]);
 
  u8g.setPrintPos(80,43);
  u8g.print("Voltage: ");
  u8g.setPrintPos(113,43);
  float voltage = analogRead(A4);    //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);
 
  int battery = voltage;
  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);
 
  battery = map( battery, 620, 820, 0, 27);
  u8g.drawBox(101, 1, battery, 4);
 
  if( voltage <=610)
  {
     u8g.drawFrame(0, 0, 128, 64);
     u8g.setColorIndex(3);
     u8g.setPrintPos(37,35);
     u8g.print("LOW BATTERY !!!");
     delay(2000);
     digitalWrite(lcdbl, LOW);
     delay(2000);
    LowPower.powerDown(SLEEP_FOREVER, ADC_OFF, BOD_OFF);
   
  }

//Serial.begin(9600);
//Serial.println("Start Receiving Data from Spider:");

//Serial.println(sens[2]);
//Serial.println(sens[3]);
//Serial.println(sens[4]);
//Serial.println(sens[5]);
//Serial.println(sens[6]);
//Serial.println(sens[7]);

  } while( u8g.nextPage() );
 
  // rebuild the picture after some delay
  delay(10);
 
 
    }












and here is the picture of the setup!
And this is the beast to be controlled:
Pages: [1] 2