Show Posts
Pages: 1 ... 30 31 [32] 33 34 ... 100
466  Using Arduino / Displays / Re: M2tklib not updating U32NUMFN element on: November 21, 2013, 06:54:59 pm
To start with the second part of your question: Have a look at http://code.google.com/p/m2tklib/wiki/fnref#getRoot. This is probably the function you are looking for.

The first part of you question is partly discussed in tutorial 6: http://code.google.com/p/m2tklib/wiki/t06u8g#Switch_to_Graphics_Page.

For the splash screen i suggest this: Assign the null element (http://code.google.com/p/m2tklib/wiki/elref#Null_Element) to the constructor. After splash screen display time has been expired, set the menu root to your toplevel menu. To show your splash screen, simply check for the null element in the draw procedure:

Code:
void draw(void) {
  if ( m2.getRoot() == &m2_null_element ) {
      // draw splash screen
     ...
  }
  else {
     m2.draw();
  }
}

Oliver
467  Using Arduino / Displays / Re: I2C SSD1306 library. on: November 20, 2013, 02:44:33 pm
Still to less information to give a usefull answer.
Please read section 11 of this thread carefully and follow the instructions there: http://forum.arduino.cc/index.php/topic,148850.0.html

Oliver
468  Using Arduino / Displays / Re: I2C SSD1306 library. on: November 19, 2013, 03:41:13 pm
This is too less information. I assume sd card will use SPI. If U8glib will I2C, then i do not expect problems.

Oliver
469  Using Arduino / Displays / Re: ST7920 multiple SPI device problems on: November 11, 2013, 06:57:45 pm
oh, Arduino Mega.

This will enable HW SPI:
Code:
U8GLIB_ST7920_128X64_1X u8g(CS_ST7920);
This will enable SW SPI:
Code:
U8GLIB_ST7920_128X64_1X u8g(13, 10, CS_ST7920);

As far as i remember u8glib will only work with SD cards if both are set to HW SPI. That means, you must use
Code:
U8GLIB_ST7920_128X64_1X u8g(CS_ST7920);
However, you need to use other pins than 13 and 10 for the Mega. You must connect both Display and SD to pins 51 (MOSI) and 52 (SCK).

Oliver
470  Using Arduino / Displays / Re: ST7920 multiple SPI device problems on: November 11, 2013, 06:06:23 pm
Hi

Did you try
Code:
U8GLIB_ST7920_128X64_1X u8g(CS_ST7920);
instead of
Code:
U8GLIB_ST7920_128X64_1X u8g(13, 11, CS_ST7920);
?

Oliver
471  Using Arduino / Displays / Re: M2TKLIB - A User-Interface-Toolkit for the Arduino Hardware on: November 09, 2013, 07:34:17 am
Today, I have released version 1.11 of M2tklib.

M2tklib is a menu/GUI library for graphics and character displays.
Projekt page: http://code.google.com/p/m2tklib/

The new version is available for download:
  @Google: http://code.google.com/p/m2tklib/downloads/list
  @Bintray: https://bintray.com/olikraus/M2tklib

From the ChangeLog:
   * Keypad Support for M2_TEXT and M2_U32NUM (Issue 108)
   * Fixed XBM code (Issues 110, 111)
   * Touch screen support for M2_STRLIST and M2_VSB (Issue 112)
   * New color graphics handler for U8glib (Issue 113)
   * Quick and Home keys (Issues 114 and 115)
   * Changed default behavioir for M2_ALGIN (Issue 121)
   * New element: M2_COMBOFN (Issue 122)
   * New tutorial on event sources (Issues  117 and 123)

Oliver
472  Using Arduino / Displays / Re: M2tklib not updating U32NUMFN element on: November 08, 2013, 12:59:17 pm
Good to read, that this works for you.

Oliver
473  Using Arduino / Displays / Re: M2tklib not updating U32NUMFN element on: November 07, 2013, 03:35:33 pm

Hi

Code:
  if ( msg == M2_U32_MSG_GET_VALUE ){
    global_value ++;
    Serial.println(global_value);
  }
This is not a correct usage of the u8glib picture loop: Do not modify global variables within the picture loop. This is tricky here, because this part of is called within m2.draw() which is called by draw() which is part of the picture loop.

Code:
  }
  draw();
  delay(500);
draw() is called outside of the picture loop. This will not work.

Alltogether i would suggest this code (not tested):
Code:
#include "U8glib.h"
#include "M2tk.h"
#include "utility/m2ghu8g.h"

//U8GLIB(             d0, d1, d2, d3, d4, d5, d6, d7, en, cs1, cs2, di, rw, reset)
U8GLIB_KS0108_128 u8g(22, 23, 24, 25, 26, 27, 28, 29, 37,  33,  34, 36, 35, 30);

uint32_t global_value = 0;

uint32_t u32_cb(m2_rom_void_p el_u32_cb, uint8_t msg, uint32_t val)
{
  if ( msg == M2_U32_MSG_GET_VALUE ){
    // wrong place to increment, do this in loop()
    // global_value ++;
   //  Serial.println(global_value);
  }
  return global_value;
}

M2_U32NUMFN(el_u32_cb, "r1c4", u32_cb);

// m2 object and constructor
M2tk m2(&el_u32_cb, m2_es_arduino_serial, m2_eh_4bs, m2_gh_u8g_bf);

void draw(void) {
    m2.draw();
}

void setup() {
 
  // Connect u8glib with m2tklib
  m2_SetU8g(u8g.getU8g(), m2_u8g_box_icon);
  m2.setFont(0, u8g_font_6x10 );
}

void loop() {
  m2.checkKey();
  // introduce a new variable "update_required"
  if ( m2.handleKey() != 0 || update_required != 0 ) {
   update_required = 0;
    u8g.firstPage(); 
    do {
      m2.checkKey();
      draw();
    } while( u8g.nextPage() );
  }
  // calling draw() is useless here, picture loop is missing
  // draw();
  delay(500);
   global_value ++;
   update_required = 1;   // force redraw by setting this variable to 1
   Serial.println(global_value);
}

Oliver
474  International / Deutsch / Re: Arduino Kurs in Stuttgart on: November 07, 2013, 03:22:28 pm
Naja, wie schon gesagt. Ich käme gerne mal vorbei... Die  Resonanz auf diesen Thread scheint mir auch nicht besonders groß zu sein  smiley-sad
Vielleicht sollte man mal unter dem Titel "Arduino Stammtisch in Stuttgart" einen neuen Thread starten.

Oliver (Landkreis BB)

475  Using Arduino / Displays / Re: Identifying my LCD on: November 06, 2013, 04:18:06 pm
Good to read, that your display works.

It seems to be normal, that the LED power has independent power pins, but i wonder, that only one 1.5 AA is enough. For my own tests, i had to use a 9V block battery as negative voltage source to see something.

Oliver
476  Using Arduino / Displays / Re: Identifying my LCD on: November 05, 2013, 11:07:37 pm
Hi

This looks already similar to the T6963 displays, that i have seen before. All connections, which go to the Arduino, are already identified.
Pin 1 often is "Frame Ground".

The remaining problem will be to identify the contrast input pin. Often, this is pin 4 (e.g. see here: http://www.noodlehed.com/ebay/datasheets/pg12864f.pdf).

My suggestion is to do this:
Apply 0 and 5V to the two power pins, which are already identified. The NVI should now start to work and the -15V..-10V output should be visible somewhere (maybe pin 9 or 20). If this is the case, then it is very likely that pin 4 is the contrast input pin. The contrast input pin should go to some resistors and caps on the PCB. Once you have identified the contrast input pin, you can connect a variable resistor:

one end of the var res goes to 0V
other end of the var res goes to the NVI output
wiper must be connected to the contrast input.

Powering the display with 5V, you should be able to turn on and off all pixels by moving the wiper from one end to the other.

Warning: Choosing the wrong contrast input might destroy your display.

Oliver

Edit: Variable resistor value should be between 10K and 22K

477  Using Arduino / Displays / Re: LCD 128x64 + KS0108 problem on: November 04, 2013, 03:04:48 pm
Attachments, yes, picture and link to the display, maybe datasheet.

Oliver


478  Using Arduino / Displays / Re: Identifying my LCD on: November 02, 2013, 12:52:52 am
All important lines will go from the connector to the T6963C. The picture is not so clear in this area, but it seems possible to trace the pins back from the T6963C. For example the C/D line (left side, lowest pin of the T6963C) goes to the lowest two pins of the connector. Maybe with an Ohm-Meter you can finally figure out the pin assignment of the connector. Specification of the T6963C can be found via google (look for "T6963 pdf", page 3 of the data sheet).

Once this is done, you can use one of the existing,libraries. Three are listed on the Playground page. I am author of one of these libraries (http://code.google.com/p/u8glib/).

More discussion (Optrex display, T6963 and u8glib) can be found here http://forum.arduino.cc//index.php?topic=175144.0

Another note: T6963 often do not have the -15V source which is required for this display. But your display seems to have a circuit for it (which is very good). Can you identify the 5 or 6 pin IC left of the label D1 (upper middle)? This area looks like a negative voltage generator.

Edit: The output (-15V) of the negative voltage generator usually is also available on the connector.

Oliver

479  Using Arduino / Displays / Re: Cant upload Bitmap on 7920 on: October 26, 2013, 12:34:46 pm
You could use http://code.google.com/p/u8glib/ which supports uncompressed XBM files (can be exported from gimp)

Oliver
480  Using Arduino / Displays / Re: Display vs Monitor on: October 23, 2013, 11:43:06 pm
Quote

Yeah that's a display without a driver smiley-sad
What do you mean by "driver"? This dispay has a controller with SPI interface and internal RAM. Sure, the charge pump requires some extra caps and soldering will be more complicated. Also, it is a 3.3V display, that might require a level shifter for some (probably most) Arduino Boards.

Oliver
Pages: 1 ... 30 31 [32] 33 34 ... 100