Show Posts
Pages: 1 ... 47 48 [49] 50 51 ... 97
721  Using Arduino / Displays / Re: Searching graphic I2C-Display on: March 31, 2013, 05:12:12 pm
Maybe the DOGXL160 could be an option:
However, only supports 4-wire SPI at the moment.

722  Using Arduino / Displays / Re: m2tklib and encoder problem on: March 31, 2013, 03:39:26 pm

Maybe you can visit and check the ino files there. Will these files work better?

You can also tweak variables inside
Try to use smaller values for

Finally you can rewrite "uint8_t m2_es_arduino_rotary_encoder(m2_p ep, uint8_t msg)" and replace the internal rotary encoder code with something more suitable:


723  Products / Arduino Due / Re: LCD library for Due? on: March 31, 2013, 03:24:31 pm

Problem is: I can not test the KS0108. I do not have a level shifter. What i can say is, that the KS0108 works great with the UNO and other 5V processors.

The related code is inside "u8g_com_arduino_parallel.c"

Assuming, that your wiring is correct, then maybe the timing is wrong for the Due. So tests could include to add larger delays inside "u8g_com_arduino_parallel.c". Please let me know if you have success here.

724  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: March 25, 2013, 06:10:37 pm
ok, here is my solution. Not tested (my hardware is not available at the moment), but it compiles without error.

Basic idea is, that the values are polled within the main "loop()". Local menu screens with display the values to the user. M2_ROOT implement a button to jump back to the top level menu.

#include <glcd.h> // inform Arduino IDE that we will use GLCD library
#include "M2tk.h"
#include "utility/m2ghglcd.h"

uint8_t uiKeySelectPin = 53;
uint8_t uiKeyDownPin = 45;
uint8_t uiKeyUpPin = 47;
uint8_t uiKeyExitPin = 51;

uint32_t value_from_A0;
uint32_t value_from_A1;
uint32_t value_from_A5;

// Forward declaration of the toplevel element

// show screen with my A0 pin value
M2_LABEL(el_a0_label, NULL, "A0");
M2_U32NUM(el_a0_u32, "c4r1", &value_from_A0);
M2_ROOT(el_a0_ok, NULL, " ok ", &top_el_menu);
M2_LIST(list_a0) = { &el_a0_label, &el_a0_u32, &el_a0_ok };
M2_VLIST(el_a0_vlist, NULL, list_a0);
M2_ALIGN(top_el_a0, "-1|1W64H64", &el_a0_vlist);

// show screen with my A1 pin value
M2_LABEL(el_a1_label, NULL, "A1");
M2_U32NUM(el_a1_u32, "c4r1", &value_from_A1);
M2_ROOT(el_a1_ok, NULL, " ok ", &top_el_menu);
M2_LIST(list_a1) = { &el_a1_label, &el_a1_u32, &el_a1_ok };
M2_VLIST(el_a1_vlist, NULL, list_a1);
M2_ALIGN(top_el_a1, "-1|1W64H64", &el_a1_vlist);

// show screen with my A5 pin value
M2_LABEL(el_temperature_label, NULL, "Temperature");
M2_U32NUM(el_temperature_u32, "c4r1", &value_from_A5);
M2_ROOT(el_temperature_ok, NULL, " ok ", &top_el_menu);
M2_LIST(list_temperature) = { &el_temperature_label, &el_temperature_u32, &el_temperature_ok };
M2_VLIST(el_temperature_vlist, NULL, list_temperature);
M2_ALIGN(top_el_temperature, "-1|1W64H64", &el_temperature_vlist);

// other voids that show any values

// Left entry: Menu name. Submenus must have a '.' at the beginning
// Right entry: Reference to the target dialog box (In this example all menus call the toplevel element again
m2_menu_entry m2_2lmenu_data[] =
  { "FFP", NULL },
  { ". volt", &top_el_a0 },
  { ". res", &top_el_a1},
  { "Temp",    &top_el_temperature },
 // etc..
  { NULL, NULL },

// The first visible line and the total number of visible lines.
// Both values are written by M2_2LMENU and read by M2_VSB
uint8_t m2_2lmenu_first;
uint8_t m2_2lmenu_cnt;

// M2_2LMENU definition
// Option l4 = four visible lines
// Option e15 = first column has a width of 15 pixel
// Option W43 = second column has a width of 43/64 of the display width

M2_2LMENU(el_2lmenu,"l4e15W43",&m2_2lmenu_first,&m2_2lmenu_cnt, m2_2lmenu_data,'+','-','\0');
M2_SPACE(el_space, "W1h1");
M2_VSB(el_vsb, "l4W2r1", &m2_2lmenu_first, &m2_2lmenu_cnt);
M2_LIST(list_2lmenu) = { &el_2lmenu, &el_space, &el_vsb };
M2_HLIST(el_hlist, NULL, list_2lmenu);
M2_ALIGN(top_el_menu, "-1|1W64H64", &el_hlist);

// m2 object and constructor
M2tk m2(&top_el_menu, m2_es_arduino, m2_eh_4bs, m2_gh_glcd_ffs);

void setup() {
  m2.setPin(M2_KEY_SELECT, uiKeySelectPin);
  m2.setPin(M2_KEY_NEXT, uiKeyDownPin);
  m2.setPin(M2_KEY_PREV, uiKeyUpPin);
  m2.setPin(M2_KEY_EXIT, uiKeyExitPin); 

void loop() {
  value_from_A0 = analogRead(A0);
  value_from_A1 = analogRead(A1);
  value_from_A5 = analogRead(A5);
  if ( m2.handleKey() ) {


Edit: Added "r1" to make the U32 fields read only.
725  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: March 24, 2013, 03:50:20 pm

To write some code i need a more detailed specification. Let us start with the temperature. Do you want to display "in" and "out" temperature? Or do you need to edit and enter some target temperature?
Do you have some specific menu layout in mind?

Another question: Did you manage to compile an run other examples from m2tklib?

726  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: March 23, 2013, 02:45:50 pm
Nice, but currently for M2tklib there is no low level graphics driver for the SSD1963

727  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: March 23, 2013, 02:17:16 pm
Another option in your case is to use M2_TOGGLE for the temperature and perhaps M2_BUTTON for other function calls.
I assume (from your example) you need the GLCD variant... i will upload it u8glib download area.

728  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: March 23, 2013, 02:09:57 pm

Ok, i think i got your point. 2LMenu never was designed to switch things on and off. Instead it was designed to jump to sub menues. However you can use M2_SPACECB to call your void procedures. See the second example here:

Another option is to use It will have a call back procedure so you can directly assign your procedures.

Both options will be available with 1.10, which has not yet been releases. I can upload a prerelease, but i need to know which variant is required for your project (u8glib? GLCD?)

729  Using Arduino / Displays / Re: Simple menu m2tklib with example. on: March 23, 2013, 11:54:39 am

Your e-mail was placed in the spam folder by gmail. Not sure why this has happend. I am sorry for that.

Use M2_ROOT() element to create a menu. Each M2_ROOT can jump to one sub menu.
Have a look at "Rapunzel" example:

M2_LABEL(el_goto_title, NULL, "Rapunzel");
M2_ROOT(el_goto_part1, NULL, "Part 1", &el_part1);
M2_ROOT(el_goto_part2, NULL, "Part 2", &el_part2);
M2_LIST(list_menu) = {&el_goto_title, &el_goto_part1, &el_goto_part2};
M2_VLIST(el_menu_vlist, NULL, list_menu);
M2_ALIGN(el_top, "W64H64", &el_menu_vlist);

The two M2_ROOT elements are form a menu, where each of the M2_ROOT elements refer to different sub-menues.


730  Using Arduino / Displays / Re: Big touchscreen display for arduino on: March 22, 2013, 02:52:43 pm
Maybe this:
I recently added support for T6963 based displays to u8glib.

731  Using Arduino / Programming Questions / Re: Menu for Display on: March 21, 2013, 03:13:34 pm
The menues should be portable, but for sure, positions need to be adjusted.

732  Using Arduino / Programming Questions / Re: Menu for Display on: March 20, 2013, 03:08:48 pm

Wow, what a long thread... still ongoing  smiley-cool
The element M2_VSB(...) (=Vertical Scroll Bar) creates the scroll bar, so removing this element will remove the scroll bar.


733  Using Arduino / Displays / Re: u8glib 1.11 reduce the size of the library on: March 20, 2013, 03:03:33 pm
Also note that fonts are available with different number of glyphs (full set or reduced set of characters). In those cases where you do not need character codes higher than 127, you could use the reduced font (postfix is 'r').

734  Development / Other Software Development / Re: (new arduino makefile, works with 1.0) on: March 20, 2013, 02:00:58 pm
Kein Problem.
I just checked the Makefile and it works just fine for me :-)

735  Development / Other Software Development / Re: (new arduino makefile, works with 1.0) on: March 19, 2013, 11:21:21 pm
But you have already refered to it. I just wanted to confirm that it works.

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