Show Posts
Pages: 1 ... 43 44 [45] 46 47 ... 102
661  Using Arduino / Displays / Re: U8glib: Graphics Lib for LCDs and OLEDs on: July 06, 2013, 11:43:10 am
Hi

U8glib Version v1.13 is available for download:

Updates include:
  • Support for SSD1351 (true color OLED) and HT1632 (LED Matrix)
  • Performance improvements for the ST7920
  • Double buffer option for ST7565 controller
  • HW SPI support for Arduino Due

Oliver
662  Using Arduino / Programming Questions / Re: Menu for Display on: July 06, 2013, 01:33:18 am
Hi

M2tklib has touch screen support. I did tests with U8glib, a dogm128 display and the touch screen mentioned in the data sheet of the dogm128: http://www.lcd-module.com/eng/pdf/grafik/dogm128e.pdf

In general almost no effort is required for resistive touch screens, u8glib and m2tklib, so my suggestion is to look for a graphics display, which is supported by u8glib and has a resistive touch screen.

The components from here http://www.lcd-module.com/eng/pdf/grafik/dogm128e.pdf are known to work.

Oliver

663  International / Deutsch / Re: Sammlung von Utilitys on: July 05, 2013, 02:46:27 pm
http://code.google.com/p/m2tklib/

Bei m2tklib setzt man seine Menüs / Eingabemasken aus einzelnen Elementen zusammen. Es gibt Elemente für Zahlen, Text, Auswahlboxen aber auch "Container"-Elemente die wiederum andere Elemente enthalten können. Alles wird im Flash abgelegt.
Referenz befindet sich hier: http://code.google.com/p/m2tklib/wiki/elref. Ausserdem gibt es viele Tutorials.

Datumseingabe sieht beispielsweise so aus:
Code:
/* edit date dialog */
uint8_t dt_day = 1;
uint8_t dt_month = 1;
uint8_t dt_year = 12;
void dt_ok_fn(m2_el_fnarg_p fnarg)  {
  m2_SetRoot(&top_el_tlsm);
}
M2_U8NUM(el_dt_day, "c2", 1,31,&dt_day);
M2_LABEL(el_dt_sep1, "", ".");
M2_U8NUM(el_dt_month, "c2", 1,12,&dt_month);
M2_LABEL(el_dt_sep2, "", ".");
M2_U8NUM(el_dt_year, "c2", 0,99,&dt_year);
M2_LIST(list_date) = { &el_dt_day, &el_dt_sep1, &el_dt_month, &el_dt_sep2, &el_dt_year };
M2_HLIST(el_date, NULL, list_date);
M2_ROOT(el_dt_cancel, NULL, "cancel", &top_el_tlsm);
M2_BUTTON(el_dt_ok, NULL, "ok", dt_ok_fn);
M2_LIST(list_dt_buttons) = {&el_dt_cancel, &el_dt_ok };
M2_HLIST(el_dt_buttons, NULL, list_dt_buttons);
M2_LIST(list_dt) = {&el_date, &el_dt_buttons };
M2_VLIST(el_top_dt, NULL, list_dt);

Oliver
664  Using Arduino / Programming Questions / Re: Menu for Display on: July 04, 2013, 03:36:56 pm
Hi

I have added another home button (M2_KEY_HOME2, m2.setHome2(...)).


Oliver
665  Using Arduino / Programming Questions / Re: Menu for Display on: July 03, 2013, 04:27:47 pm
ok, i have implemented something. Which variant of m2tklib do you need? I mean, what is your display?

Oliver
666  Using Arduino / Displays / Re: DMF5005N optrex on: July 03, 2013, 02:06:33 pm
Hi

1) Download u8glib
2) install u8glib in the libraries folder (unzip there)
3) start arduino IDE
4) You should see the u8glib submenu in the Examples section
5) locate "HelloWorld"
6) open "HelloWorld" example
7) Find this line in the example:
Code:
//U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
8 ) Uncomment this line:
Code:
U8GLIB_T6963_240X64 u8g(8, 9, 10, 11, 4, 5, 6, 7, 14, 15, 17, 18, 16); // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
9) Ensure that the arduino board is not connected to any power or usb
10) Connect your display as described in the comment: // 8Bit Com: D0..D7: 8,9,10,11,4,5,6,7, cs=14, a0=15, wr=17, rd=18, reset=16
10a) Connect Data lines from D0 to D7 to pins 8,9,10,11,4,5,6,7
10b) Connect the chip enable display pin (called cs in U8glib) to pin 14, which is labled as A0 on the Uno
10c) Connect the c/d display pin (called a0 in U8glib) to pin 15, which is labled as A1 on the Uno
10d) Connect wr, rd and reset to 17, 18, 16, which are A3, A4, A2
11) Connect FS to 0V (Gnd)
12) Connect FG to 0V (Gnd)
13) Create a -15V source. Best is to use a DC/DC converter, which creates -15V from +5V. Of course for testing any -15V power soruce will be ok. For example 10x 1.5V AA batteries: Connect +15V of the batterie back to GND and the GND of the battery pack will be -15V.
13) The variable potentiometer: Connect one end to GND, connect the other end to -15V, connect the wiper to V0

Oliver

Edit:
14) Connect Arduino to your PC, download "HelloWorld" example. Adjust wiper until you see the HelloWorld String. Optional: Post a picture of the result.
667  Using Arduino / Programming Questions / Re: Menu for Display on: July 02, 2013, 02:26:41 pm
How many (quick) buttons would you need?

Oliver
668  Using Arduino / Displays / Re: DMF5005N optrex on: July 02, 2013, 12:12:55 pm
Hi

Please have a look here: http://forum.arduino.cc/index.php?topic=172563

I suggest to connect the variable pot as described here (page 4): http://www.newhavendisplay.com/specs/NHD-24064CZ-FSW-GBW.pdf

For the graphics lib: Download U8glib v1.12 from here: http://code.google.com/p/u8glib/downloads/list
Follow the install instructions in "install.txt"

Let me know if you have more questions.

Oliver

Edit: VEE in the refered data sheet must be replaced by the output of an extern negative voltage source (-15V)
669  Using Arduino / Programming Questions / Re: Menu for Display on: July 02, 2013, 12:53:45 am
Hi, glad to see that you are still working with m2tklib.

Yes, this is possible. You could use the HOME Button for this. If the M2_KEY_HOME button is pressed, it will "jump" to a specified menu (http://code.google.com/p/m2tklib/wiki/fnref#setHome)

The "Home-Menu" can be a top-level menu but of course any other sub menu also.

Oliver
670  Using Arduino / Displays / Re: TFT LCD Mega Shield V1.2 - Pin or Connection Problem on: July 01, 2013, 05:28:09 pm
UTFT is a good choice for the TFT, but i am not an expert on that library  smiley-roll

Oliver
671  Using Arduino / Displays / Re: DMF5005N optrex on: July 01, 2013, 05:26:50 pm
As usual, a link to the datasheet would help. After some internet search, i found this: http://www.kyocera-display.com/SiteImages/PartList/SPEC/DMF5005N-COE-DDN_Eng.pdf

According to the datasheet, the display has a size of 240x64 pixel (page 2)
The controller is a T6963 (page 2)
The contrast setup is shown on page 8, but i do not think that you need a transistor. A simple variable potentiometer will be good enough. But you will need some -15 V (I have used a DC-DC converter module for this).

Once done with the electrical setup, you can use u8glib (http://code.google.com/p/u8glib/):

Code:
U8GLIB_T6963_240X64(d0, d1, d2, d3, d4, d5, d6, d7, cs, a0, wr, rd [, reset])

Notes:
1. cs = c/e (pin7) and a0 = c/d (pin 8 )
2. Connect FG and (IMPORTANT!!!) FS to 0V

Oliver
672  Using Arduino / Displays / Re: TFT LCD Mega Shield V1.2 - Pin or Connection Problem on: June 30, 2013, 01:17:51 am
There are different types of LCD. LiquidCrystal Lib only supports character LCDs. It will not work with a TFT LCD.
Try to identify the controller of your TFT LCD (usually mentioned in the datasheet for your display), then look for a GLCD library which supports this controller.

Oliver
673  Using Arduino / Displays / Re: Analog Joystick with M2TKLIB on: June 24, 2013, 12:25:21 am
If the GRIDLIST (or any other dialog) is larger than the display, then the results are not defined.

You can always define your own event handler. In an .ino (.pde) file it might look like this:
Code:
extern "C" uint8_t my_m2_eh_6bs(m2_p ep, uint8_t msg, uint8_t arg1, uint8_t arg2)
{
  m2_nav_p nav = m2_get_nav(ep);
  switch(msg)
  {
    case M2_EP_MSG_SELECT:
     
      /* if the field has data entry, than increment the data */
      if ( m2_nav_is_data_entry(nav) )
return m2_nav_data_up(m2_get_nav(ep));
     
      /* else go down: do not use m2_nav_down, instead use m2_nav_user_down to skip design elements */
      return m2_nav_user_down(nav, 1);

    case M2_EP_MSG_EXIT:
      return m2_nav_user_up(m2_get_nav(ep));
     
    case M2_EP_MSG_NEXT:
      return m2_nav_user_next(m2_get_nav(ep));

    case M2_EP_MSG_PREV:
      return m2_nav_user_prev(m2_get_nav(ep));
   
    case M2_EP_MSG_DATA_DOWN:
if ( m2_nav_data_down(nav) == 0 )
          return m2_nav_user_next(nav);
        return 1;
    case M2_EP_MSG_DATA_UP:
if ( m2_nav_data_up(nav) == 0 )
          return m2_nav_user_prev(nav);
        return 1;
  }
  return 0;
}

I think, what you mean is this:
Code:
extern "C" uint8_t my_m2_eh_6bs(m2_p ep, uint8_t msg, uint8_t arg1, uint8_t arg2)
{
  m2_nav_p nav = m2_get_nav(ep);
  switch(msg)
  {
    case M2_EP_MSG_SELECT:
     
      /* if the field has data entry, than increment the data */
      if ( m2_nav_is_data_entry(nav) )
return m2_nav_user_up(m2_get_nav(ep));   // THIS HAS CHANGED
     
      /* else go down: do not use m2_nav_down, instead use m2_nav_user_down to skip design elements */
      return m2_nav_user_down(nav, 1);

    case M2_EP_MSG_EXIT:
      return m2_nav_user_up(m2_get_nav(ep));
     
    case M2_EP_MSG_NEXT:
      return m2_nav_user_next(m2_get_nav(ep));

    case M2_EP_MSG_PREV:
      return m2_nav_user_prev(m2_get_nav(ep));
   
    case M2_EP_MSG_DATA_DOWN:
if ( m2_nav_data_down(nav) == 0 )
          return m2_nav_user_next(nav);
        return 1;
    case M2_EP_MSG_DATA_UP:
if ( m2_nav_data_up(nav) == 0 )
          return m2_nav_user_prev(nav);
        return 1;
  }
  return 0;
}

yes, could be a nice idea...


Oliver
674  Using Arduino / Project Guidance / Re: u8g splash screen on: June 22, 2013, 01:56:13 pm
use the following sequence in setup():

Code:
  // picture loop
  u8g.firstPage(); 
  do {
    draw_splash_screen();
  } while( u8g.nextPage() );
 
  // show splash screen for a 2 seconds
  delay(2000);

Oliver
675  Using Arduino / Displays / Re: ITDB32S direct write or 'poke' display memory? on: June 22, 2013, 04:56:42 am
1) drawPixel is not the only cause for the delay. Try to optimize SD card access (for example by reading multiple bytes with one command)
2) "poke" will not work, because the display memory is not memory mapped into the controller. Display data usually is transfered via SPI or parallel interface.

Oliver
Pages: 1 ... 43 44 [45] 46 47 ... 102