Show Posts
Pages: 1 ... 35 36 [37] 38 39 ... 100
541  Using Arduino / Displays / Re: looking for a big oled screen on: September 08, 2013, 02:36:33 pm

about 35 cm²:

supported by
List of fonts:

542  Using Arduino / Displays / Re: SSD1306 Oled and U8glib not working in combination with other SPI device on: September 08, 2013, 09:26:05 am
Independent from u8glib, i remember two situations where the ATMEGA stops working:
- I2C without proper pullups or I2C device which is not responding correctly
- SPI communication where the "slave select" pin is not used/wired correctly

Is there something connected to pin 10? Is some lib expecting that a SPI device is connected to pin 10?
If pin 10 is unused, but HW SPI is required, then you need to set it to output:
pinMode(10, OUTPUT); /* system chip select for the atmega board */
digitalWrite(10 HIGH);

Which is the RFM69 lib?

This setup (from your previous post) is wrong, because the RFM69 also assumes pin 10 as chips select line (by using the default constructor "RFM69 radio").
#define OLED_DC              9   //7
#define OLED_CS              10  //5
#define OLED_CLK             13  //4
#define OLED_MOSI            11  //9
#define OLED_RESET           6
#define FREQUENCY            RF69_433MHZ
#define NODEID               99
#define NETWORKID            100
#define SERIAL_BAUD          115200

RFM69 radio;

Infact i would suggest to use
RFM69 radio(RFM_CS);
and define RFM_CS to some pin number (10 probably is ok). To which pin of the Arduino board is the NSS pin connected of the RFM69 module?

While SCK and MOSI can be shared between display and RFM69, there must be two different chip select lines.

My suggestion is to post how our modules / displays are wired.


543  International / Deutsch / Re: 4 Tasten LCD Menü on: September 08, 2013, 08:33:06 am

Ich kenne die von Dir verwendete Lib leider nicht, aber mit sollte so etwas sehr einfach sein. M2tklib herunterladen und im "libraries folder" entpacken. Wenn die Beispiele in der Arduino IDE funktionieren (nachdem die Buttons via setPin gesetzt wurden), besteht der Rest eigentlich nur noch aus dem Design der Menüs und Dialogboxen.

Ich würde für M2tklib am Anfang die Tutorials 1-3 und 8 empfehlen:

Noch eine Kleinigkeit: M2tklib erlaubt verschiedene Eingabestrategien, die in Form von sogenannten "button-handlern" (bzw event handler) hinterlegt sind. Es gibt button handler für 2, 4 und 6 "Hauptfunktionstasten". Zusätzlich können zu allen "button-handlern" noch Spezialtasten definiert werden (z.B. Home-Key). In deinem Falle würde ich den "simplified four button-handler" (4bs) empfehlen:

Zudem kann man mit m2tklib sowohl die Buttons als auch die LCD Ausgabe (oder beides) über den seriellen Monitor simulieren. So kann man Fehler in HW oder SW recht schnell ausschließen:
544  Using Arduino / Displays / Re: SSD1306 Oled and U8glib not working in combination with other SPI device on: September 08, 2013, 07:11:37 am
If there are 4 lines left, maybe you can connect the oled to these 4 pins which are not shared with any other device. Then use u8glib with SW SPI mode (the four pin numbers as four arguments for the constructor).

If the controller still freezes, then maybe it is not an u8glib issue at all.

545  Using Arduino / Displays / Re: SSD1306 Oled and U8glib not working in combination with other SPI device on: September 08, 2013, 05:10:33 am

The constructor
puts u8glib in sw spi mode.
Did you tried hw spi: "U8GLIB_SSD1306_128X64 oled(OLED_CS,OLED_DC);" ?

546  Using Arduino / Displays / Re: SSD1306 Oled and U8glib not working in combination with other SPI device on: September 08, 2013, 03:34:31 am

Unfortunately there is not concept of sharing SPI between two libraries. So it is often unpredictable whether and how two libs work together.

If you can provide more information, i mighte give some better advice in this case:
How is u8glib configured? HW SPI/SW SPI? Which lines are shared? What is the current init code.

  sprintf(buff, "%d%%", i);
  oled.drawStr(20,55, buff);
Which font do you use?

547  Using Arduino / Displays / Re: m2tk 3 level menu on: September 07, 2013, 12:22:02 pm
3-level-menus are not supported.

548  Using Arduino / Programming Questions / Re: LCD Menu question on: September 07, 2013, 04:06:18 am
See also here:

Of course i suggest M2tklib, which is the one i wrote  smiley-wink

Some benefits for M2tklib:
- Supports LiquidCrystal and fm's NewLiquidCrystal Lib
- Also supports some GLCD libs, so that the code can be easily taken over to GLCDs
- LCD over serial simulation, that means, the menues are displayed on the serial monitor and buttons can be simulated via input from serial monitor. As a result, for the testing of M2tklib you just need a plain Arduino Board (without buttons and wthout LCD).
- Button debounce is part of M2tklib. Also supports rotary incremental encoder. Examples for analog buttons are available.

549  International / Français / Re: U8glib Effacement de caractères. on: September 05, 2013, 06:08:56 am
I am sorry not beeing able to understand french, but what i read from the code, i think
if ((int)GPS.angle>10<=45)
should be
if ((int)GPS.angle>10 && (int)GPS.angle<=45)

550  Using Arduino / Displays / Re: Help me connecting a GLCD to arduino on: September 05, 2013, 12:06:07 am
Very good.

In u8g_dev_lc7981_240x64.c change
#define HEIGHT 64
#define HEIGHT 40

551  Using Arduino / Displays / Re: Help me connecting a GLCD to arduino on: September 04, 2013, 01:04:24 am

I do not know the difference between the LC7981 and LC7980, so the following applies to the LC7981:

U8glib requires the following pins:
U8GLIB_LC7981_160X80(db0, db1, db2, db3, db4, db5, db6, db7, rd(e), cs, rs [, rw [, reset]])

Displays with the LC7981 controller require an extrernal contrast adjustment, which require -15V. You will not see anything without feeding this negative voltage into the contrast input of the display.

552  Using Arduino / Programming Questions / Re: Menu for Display on: August 26, 2013, 09:03:04 am

Unfortunately this not supported by u8glib. I think you can use UTFT with it (however, UTFT is not supported by m2tklib).

553  Using Arduino / Displays / Re: What library will work with this graphic LCD? on: August 25, 2013, 05:22:08 pm
Pinout seems to be identical to this display:

My suggestion is to use the serial interface to connect this display to the Arduino. Lower part of this page: Also note, that this display requires an external var pot as shown in the schematics.

U8glib ( should work here.

554  Using Arduino / Programming Questions / Re: m2tklib w/ glcd analog button input menu navigation on: August 24, 2013, 03:24:18 pm
Hi Niels

A good automatic alignment is done by the M2_GRIDLIST container. There should be some examples which make use of this element. The M2_XYLIST could be also an option for manual placement of the elements.


555  Using Arduino / Programming Questions / Re: m2tklib w/ glcd analog button input menu navigation on: August 24, 2013, 12:57:39 pm

m2 isn't initialized yet and whenever I put the list after the initialization I get other errors as well.
Well, without seeing the full code this is hard to say. If you mean "declared" instead of "initialized", then maybe declaring as an external variable might help:
extern M2tk m2;
at the very beginning of your code, will make m2 available before the actual definition.

M2_BUTTON or the more simpler version M2_ROOT could be used to construct menues. However, you are right, scrolling is not possible. 

For this element
M2_BUTTON(el_video_btn, NULL, " Video dolly", fn_video_btn);
i was thinking if M2_TOGGLE might be a better solution. But M2_TOGGLE needs a label along with it (it does not have a text):
uint8_t light_on = 0;
M2_LABEL(el_light_on_label, NULL, "Light On: ");
M2_TOGGLE(el_light_on_toggle, NULL, &light_on);
Of course you can combine both with M2_HLIST and replace the button from above with M2_VLIST:
M2_LIST(list_light_dialog) = {
    &el_light_on_label, &el_light_on_toggle,
M2_VLIST(el_light_vlist, NULL, list_light_dialog);
Note: You can nest containers, so a HLIST can contain a VLIST container.

Another idea is to use STRLIST with dynamic string rendering for toggle values. Here is some example code, which uses the addational string column of M2_STRLIST to display "*" or " " depending on the toggle value.
/* multi selection */

const char *multi_select_strings[MULTI_SELECT_CNT] = { "red", "green", "blue" };
uint8_t multi_select_status[MULTI_SELECT_CNT] = { 0, 0, 0};

uint8_t el_muse_first = 0;
uint8_t el_muse_cnt = MULTI_SELECT_CNT;

const char *el_muse_strlist_cb(uint8_t idx, uint8_t msg) {
  const char *s = "";
  if ( msg == M2_STRLIST_MSG_SELECT ) {
    if ( multi_select_status[idx] == 0 ) {
      multi_select_status[idx] = 1;
    else {
      multi_select_status[idx] = 0;
  if ( msg == M2_STRLIST_MSG_GET_STR ) {
    s = multi_select_strings[idx];
    if ( multi_select_status[idx] == 0 ) {
      s = " ";
    else {
      s = "*";
  return s; 

M2_STRLIST(el_muse_strlist, "l3F0E10W46", &el_muse_first, &el_muse_cnt, el_muse_strlist_cb);
M2_ROOT(el_muse_goto_top, "f4", "Goto Top Menu", &top_el_tlsm);

M2_LIST(muse_list) = {
M2_VLIST(el_muse_vlist, "c2", muse_list);
M2_ALIGN(top_el_muse, "-1|1W64H64", &el_muse_vlist);

Just some ideas...

Pages: 1 ... 35 36 [37] 38 39 ... 100