Show Posts
Pages: 1 ... 46 47 [48] 49 50 ... 97
706  Using Arduino / Displays / Re: M2TKLIB - A User-Interface-Toolkit for the Arduino Hardware on: April 08, 2013, 02:14:48 pm
Yes, it should be possible to use setKey() if you do not want to rewrite the event source.

707  Using Arduino / Displays / Re: 4-Wire SPI Graphic Display W/ Arduino Mini on: April 08, 2013, 02:09:50 pm

Graphics display do not have a standard interface. The electrical interface is different and also set of commands are specific to the controller. So things like 4-wire or 3-wire SPI, I2C, 4/8 Bit parallel are very specific to the controller (of course I2C should follow some standards).

But at the end, you have a specifc display in mind. This display has a UC1701 controller (compatible with ST7565). The 3-wire SPI is not HW compatible with AVR chips, but the 4-wire SPI interface works very well with the Arduino.

From my work with U8glib i can say, that supporting a specific controller is a challenging task, but supporting different displays with same controller is a time consuming task because of the different electrical characteristics and the individual memory mapping.

Here is my suggestion (unless you want to program this display from scretch):
Download and check all UC1701 and ST7565 constructors with 128x64 dimension one by one (uncomment them in the HelloWorld example). Hopefully you will find a fitting device ( Especially look at a constructor where the display content is shown correctly (contrast issues can be adjusted with setContrast). If you do not find a fitting device for u8glib, please contact me and we will add a new u8glib device for your display.


708  International / Deutsch / Re: Displaynutzung mit Lilypad? on: April 08, 2013, 12:53:29 pm
Bezüglich monochromer graphischer OLED: Die meisten dieser OLEDs (beispielsweise von Adafruit oder Newhavendisplay) werden von unterstützt. Da der Stromverbrauch linear von den eingeschalteten "Pixel" abhängt, läßt sich der Verbrauch auch über den Inhalt steuern. Zusätzlich haben OLEDs üblicherweise einen elektronischen Helligkeitsregler (setContrast() in U8glib).

Für E-Paper sieht die Versorgung mit fertigen Libs schon etwas schlechter aus: Mir ist keine fertige Arduino Lib für E-Paper Displays bekannt.

709  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: April 08, 2013, 11:54:11 am

I think the first thing to do is to run one of the M2tklib examples (Ensure to use M2tklib for U8glib).
Use the same U8glib constructor call as for the U8glib Hello World example.
Then add pin numbers to M2tklib.

710  Products / Arduino Due / Re: Scheduler and U8glib on DUE on: April 07, 2013, 04:13:09 pm
Hi cmaglie

Regarding your link to the LiquidCrystal lib: I had a similar problem with init of the display within u8glib.
After constructor calls, the Arduino Due will reset all I/O pins. This problem still exists in 1.5.2.


711  Products / Arduino Due / Re: Scheduler and U8glib on DUE on: April 07, 2013, 03:16:32 pm
Well, yes, and indeed the modification of u8g_Delay() is more a workaround (or hack) instead of a good solution. To excause the current situation a little bit: I never read in the Arduino documentation that some of the procedures are not valid to be called during constructor time. And on the ATMEGA it was never a problem to call digitalWrite() or delay() in the constructor.

For the port to the Arduino Due i also had to deal with this problem because of some other conflicts. U8glib already has a begin() procedure. But u8glib has not been completly redesigned for it. So to say, i am on the half way of a complete redesign of the internal architecture without changing much of the existing API.

So to conclude this:
I was not aware of this problem in the past, but now i do my very best to update U8glib.

My suggestion to the Arduino Project: Please clearly state that delay() and digitalWrite() must not be used in any construtor calls.


712  Using Arduino / Displays / Re: M2TKLIB - A User-Interface-Toolkit for the Arduino Hardware on: April 07, 2013, 03:00:34 pm

1) Extend the event source to generate the new events (M2_EP_MSG_KEY_1, M2_EP_MSG_KEY_2, ...)

2)  Introduce a new (corresponding) element msg, e.g. M2_EL_MSG_KEY_1
Extend one of the event handlers to process the new key event, for example extend
uint8_t m2_eh_4bs(m2_p ep, uint8_t msg, uint8_t arg1, uint8_t arg2)

Then add this code to the event handler (for each event):

  case M2_EP_MSG_KEY_1:
    m2_fn_arg_call(M2_EL_MSG_KEY_1); // assign the char
    return m2_nav_user_next(nav); // go to next position

3) Next step is to make the elements aware about the new element messages.
For example M2_TEXT would make sense here (m2eltext.c):

Extend the char processing function: M2_EL_FN_DEF(m2_el_char_fn)

  case M2_EL_MSG_KEY_1:
      cp = m2_get_char_ptr(fn_arg->nav);
      *cp = '1';
      return 1;

Of course: not tested...

713  Using Arduino / Displays / Re: Arduino UNO LCD on: April 07, 2013, 05:43:02 am

Be aware of the limited ROM/RAM size. Full color pictures for TFT will require a lot of FlashROM memory.

I think some shields with the 4D Systems Displays do have an integrated SD Card. See also here for the lib:,60802.0.html

Another lib for TFT displays (from other suppliers) is discussed here:,144189.0.html.

Some users prefer to use monochrom graphics LCDs and OLEDs. The amount of data, which needs to be transfered, is much less and also pictures can be monochrome. The two of the libs are: for KS0108 displays. for most other types of monochrome graphics LCDs and OLEDs.

You can also have a look at Frank's E-Bike controller for some inspiration, done with a DOGXL160 display and u8glib:


714  Products / Arduino Due / Re: Scheduler and U8glib on DUE on: April 06, 2013, 03:09:48 am
Thanks for your feedback. I have created an issue:

715  Using Arduino / Displays / Re: M2tklib: Menu and User Interface Library on: April 06, 2013, 01:05:38 am
Yes, a display with ST7565 controller is supported by U8glib ( and M2tklib is available for U8glib.

716  Products / Arduino Due / Re: U8glib works with some effort on GLCD on: April 05, 2013, 06:24:41 pm
Good work.

Thanks for reporting,
717  Products / Arduino Due / Re: Scheduler and U8glib on DUE on: April 05, 2013, 06:22:17 pm

I did some review on the both sides, the U8glib startup (which was really difficult on the DUE) and on the Scheduler.
For historical reasons, U8glib tries to setup the display inside the constructor. This means, procedure like digitalWrite() and delay() are already called at constructor time.

Indeed, the delay code from /arduino-1.5.2/hardware/arduino/sam/cores/arduino looks like this.
void delay( uint32_t ms )
    uint32_t end = GetTickCount() + ms;
    while (GetTickCount() < end)

So the yield procedure might be called without proper setup of the scheduler.
What could be done is to redefine the u8g delay procedure in u8g_delay.c:

void u8g_Delay(uint16_t val)
replace ist by
void u8g_Delay(uint16_t val)

maybe this works because delayMicroseconds does NOT call yield() ...


718  Using Arduino / Displays / Re: M2tklib: Menu and User Interface Library on: April 05, 2013, 12:41:52 pm
Hi shadowkat10

Unfortunately the answer is no. Neither U8glib nor GLCD support this kind of display.
UTFT might be a better starting point:

719  Using Arduino / Displays / Re: M2tklib: Menu and User Interface Library on: April 04, 2013, 03:40:30 pm
I have created release v1.10 of M2tklib:

New to M2tklib:
* Works with Arduino Due (IDE 1.5.2)
* Touch screen support
* New variant for NewLiquidCrystal lib
* New menu elements (M2_X2LMENU, M2_HIDE, M2_S8NUM, M2_BOX)

M2tklib is a menu library for graphics and character devices.

720  Using Arduino / Programming Questions / Re: An every X-days alarm/output, suggestions? on: April 02, 2013, 05:54:26 pm
Derive the julian day number (JDN) from the date:
Condition "JDN % 2 == 0" is true every second day
Condition "JDN % 3 == 0" is true  every third day
Condition "JDN % 4 == 0" is true  every fourth day

An similar version for the JDN calculation is also part of our RTC Arduino lib: (void DS1307new::calculate_cdn(void))

Pages: 1 ... 46 47 [48] 49 50 ... 97