Loading...
  Show Posts
Pages: 1 ... 32 33 [34] 35 36 ... 54
496  Using Arduino / Displays / Re: How to fix all character LCD problems - read this! on: April 20, 2012, 02:40:58 pm
Hi liudr

Good posting. You could remove "character" from the topic. It applies to graphic LCDs also.
In fact, it also applies to OLEDs.

Where is the sticky button?  smiley-wink

Oliver
497  Using Arduino / Displays / Re: Help me to get my display working on: April 20, 2012, 02:34:47 pm
Could be similar to this display:
http://iteadstudio.com/store/index.php?main_page=product_info&cPath=57_58&products_id=54

Oliver
498  Using Arduino / Displays / Re: U8glib on: April 19, 2012, 03:19:13 pm
Also a good question. For sure, u8glib does not support any digraphs.
Oliver
499  Using Arduino / Displays / Re: U8glib on: April 19, 2012, 02:30:30 pm
Hi Bill
Quote
Is there drawChar() api function smiley-wink
Good point. It does not exist on the Arduino C++ interface, but it is there on the C-level interface. It should be added.

Quote
The other tricky thing is that the font either needs to be a fixed width
or the variable width characters need to be rendered centered
within a fixed width.
Additionally the are two different "a" out there.

Reference to Wikipedia (http://en.wikipedia.org/wiki/A):


I am not sure, why there is a need to overstrike two glyphs. I would expect, that all common glyphs are inside unifont.

Oliver
500  Using Arduino / Displays / Re: U8glib on: April 19, 2012, 07:34:58 am
Hi
Overstrike of two chars is no problam. Simply draw the char at the same location
Code:
u8g.drawChar(10,10, "K");
u8g.drawChar(10,10, "a");

Of course you need to use a font with latin "a" and "K" glyphs.

Oliver
501  Using Arduino / Displays / Re: Problem: NewHaven I2C Display, Won't Compile on: April 16, 2012, 04:46:08 pm
As far as I remember, the write function prototype has been changed for Arduino 1.0. Move back to Arduino-0023 or lookout for an update of the library.

Oliver
502  Community / Products and Services / Re: Arduino User Interface Professional development kit for phi_prompt on: April 16, 2012, 12:01:28 am
Great work. What does "Professional" mean in this context? Will it be available for the community for free?

Oliver
503  Using Arduino / Displays / Re: Getting DFRobot SPI LCD module to work? on: April 15, 2012, 04:19:46 pm
Additional note: This display and its controller are also supported by U8glib (http://code.google.com/p/u8glib/). U8glib has a Software SPI emulation, which allows the use of any pins of the Arduino board for this display. So I/O conflicts could be avoided by remapping I/O pins.

Oliver
504  Using Arduino / Displays / Re: M2TKLIB - A User-Interface-Toolkit for the Arduino Hardware on: April 15, 2012, 04:08:59 pm
Hi All

Topic 1:

I have released M2tklib (http://code.google.com/p/m2tklib/) for U8glib (http://code.google.com/p/u8glib/).

M2tklib builds menus and dialog windows on top of an existing graphics or
character library. Currently, M2tklib supports the following libraries:
  • Graphic LCDs:
          GLCDv3
          dogm128 lib
          U8glib
  • Character LCDs:
          LiquidCrystal
          DogLcd lib (send PM)
Other character LCD libraries could be added on request.
 
Dialog elements include: Radio Buttons, Toggle Button, Combo Box, Text Entry,
Number Entry, Push Buttons, Dynamic length menues, Scrollbar (also for character LCDs),
Container Widgets (Grid, XY-List, ...)



With U8glib as graphics subsystem, M2tklib can be used on a large number of
displays (http://code.google.com/p/u8glib/wiki/device). This includes Adafruit
and DFRobot displays.

Topic 2: M2tklib for character LCDs

Related to the current discussion on character menues: I recently developed a small menu for a user in the international part of this forum: http://arduino.cc/forum/index.php/topic,99105.0.html
Here are some screenshots of the character version of M2tklib:

Main menu with four entries, focus on the first:


A single selection menu with scrollbar (the scrollbar is composed of 4 user defined characters with pixel exact resolution):


A simple number entry dialog, focus on the number:


Same dialog, focus on the ok button:


The source code for these dialog entry screens is very simple and portable betwen graphics and character LCDs.


Oliver
505  Using Arduino / Displays / Re: U8glib on: April 14, 2012, 01:31:58 am
Hi cnavnath

This is possible. You need a font which contains hindi glyphs. U8glib can use the glyphs from unifont (http://unifoundry.com/unifont.html). The font u8g_font_unifont_18_19 (http://code.google.com/p/u8glib/wiki/fontgroupunifont) already contains some Sanskrit glyphs from unicode page 09xx.

You just provide this hindi font to u8glib with the setFont command:
Code:
u8g.setFont(u8g_font_unifont_18_19);
After this, you can use u8g.DrawStr(x,y, "abc") to draw the Sanskrit glyphs.

If you need glyphs from another uncode page, you may use bdf2u8g (http://code.google.com/p/u8glib/source/browse/#hg%2Ftools%2Ffont%2Fbdf2u8g) to construct your own selecton of glyps.
You can also tell me which glyphs you need from unifont and I can construct one or more fonts for you.

Oliver

Edit: Fontname
506  Using Arduino / Displays / Re: U8glib on: April 14, 2012, 01:13:02 am
Hi Chris

I am not sure what you mean by "ASCII print". A chart of ASCII glyphs can be produced in this way:

Code:
void u8g_ascii_1() {
  char s[2] = " ";
  uint8_t x, y;
  u8g.drawStr( 0, 0, "ASCII page 1");
  for( y = 0; y < 6; y++ ) {
    for( x = 0; x < 16; x++ ) {
      s[0] = y*16 + x + 32;
      u8g.drawStr(x*7, y*10+10, s);
    }
  }
}

As shown in the second tutorial (http://code.google.com/p/u8glib/wiki/thelloworld) there is no clear screen command. Instead, as soon as you enter the picture loop, the screen gets cleared.
See also the background article here: http://code.google.com/p/u8glib/wiki/tpictureloop

In order to display a screen, wait some time and than display another screen, you may use the code and ideas from "GraphicsText.pde" (attached to this post, but also part of the Arduino examples).

Oliver
507  Using Arduino / Displays / Re: U8glib on: April 13, 2012, 05:14:34 pm
I checked v1.03 with my DOGXL160 display. HW SPI and SW SPI are fine. I do not see any issues here.

Oliver
508  Using Arduino / Displays / Re: inserting regional language in lcd(programming CGRAM of lcd) on: April 13, 2012, 04:54:05 pm
Just a little remark on U8glib: I have already added Devanagari/Sanskrit to u8glib as part of the release. This includes unicodes 0x0900..0x09ff (as far as I remember):
http://code.google.com/p/u8glib/wiki/fontgroupunifont

Glyphs are taken from Unifont (http://unifoundry.com/unifont.html). In principle, any glyphs from Unifont can be translated to a font for u8glib. However, for u8glib a font can only contain 256 glyphs.

U8glib also supports KS0108 devices (limited to 128x64 pixel at the moment and lower speed than GLCDv3)

Oliver
509  Using Arduino / Displays / Re: U8glib on: April 13, 2012, 07:14:18 am
Hi

I recently added the 2X driver. Can you please check the single buffer constructor (without 2X).
I also do not own a Mega Board, so i have to rely on whatever the Arduino.h file has defined for the Hardware Pins.
If these hardware pins require some special settings, than these settings are not known to me.

But in any case, the SW SPI should work.

Your observation might also be caused by the connected hardware. How do you do the level transition?
Is it a HC4050 level translator for the signals? Resistor networks might work, but you might observe
other voltage ranges.

Oliver
510  Using Arduino / Displays / Re: MENWIZ: yet another character lcd menu wizard library on: April 08, 2012, 12:56:07 am
Quote
The code needed to implememt the example Olikraus suggested is as following.

So, here is the M2tklib version. You will see, that the menu is defined outside any procedure. It is placed directly in the data area (PROGMEM) of the controller. The other difference is the "choice" variable. In M2tklib, buttons only call a sub-procedure. The result must be assigned manually in this case.  In the MENWIZ example, it seems that choice is automatically connected to the line number.

Regarding the discussion about LiquidCrystal variants: M2tklib uses a message based interface to an "output handler". This is " m2_gh_lc" for LiquidCrystal (see below). Replacing this with  "m2_gh_glcd", will render the output for GLCD v3. By writing such a handler, any character or graphical output device could be used.

Oliver

Code:
//  Menu.pde
// http://arduino.cc/forum/index.php/topic,99693.15.html

#include <LiquidCrystal.h>
#include "M2tk.h"
#include "utility/m2ghlc.h"

//=========================================================
// fotward declaration
extern M2tk m2;

//=========================================================
// keys
uint8_t uiKeySelectPin = 10;
uint8_t uiKeyNextPin = 9;

//=========================================================
// global variable: selected line
uint8_t choice = 0;

//=========================================================
// display result
M2_U8NUM(result_menu, NULL, 0, 255, &choice);

//=========================================================
// line selection

// callbacks for the buttons
void fn_line1(m2_el_fnarg_p fnarg) { choice = 0;  m2.setRoot(&result_menu); }
void fn_line2(m2_el_fnarg_p fnarg) { choice = 1;  m2.setRoot(&result_menu); }
void fn_line3(m2_el_fnarg_p fnarg) { choice = 2;  m2.setRoot(&result_menu); }
void fn_line4(m2_el_fnarg_p fnarg) { choice = 3;  m2.setRoot(&result_menu); }

// layout of the menu
M2_BUTTON(el_line1, NULL, "Line 1", fn_line1);
M2_BUTTON(el_line2, NULL, "Line 2", fn_line2);
M2_BUTTON(el_line3, NULL, "Line 3", fn_line3);
M2_BUTTON(el_line4, NULL, "Line 4", fn_line4);
M2_LIST(list_lines) = { &el_line1, &el_line2, &el_line3, &el_line4 };
M2_VLIST(line_menu, NULL, list_lines);

//=========================================================
// lcd setup
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);

//=========================================================
// M2tklib setup
// m2_es_arduino: Arduino event source
// m2_eh_2bs: Two button handler
// m2_gh_lc: Character subsystem
M2tk m2(&line_menu, m2_es_arduino, m2_eh_2bs, m2_gh_lc);


//=========================================================
// Arduino setup()
void setup() {
  // Connect M2tklib to LCD
  m2_SetLiquidCrystal(&lcd, 16, 4);
 
  // Apply keys
  m2.setPin(M2_KEY_SELECT, uiKeySelectPin);
  m2.setPin(M2_KEY_NEXT, uiKeyNextPin);
}

//=========================================================
// Arduino loop()
void loop() {
  m2.checkKey();
  if ( m2.handleKey() )
    m2.draw();
  m2.checkKey();
}

Pages: 1 ... 32 33 [34] 35 36 ... 54