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²:
http://www.newhavendisplay.com/nhd2712864ucy3-p-3621.html


supported by http://code.google.com/p/u8glib/.
List of fonts: http://code.google.com/p/u8glib/wiki/fontsize

Oliver
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:
Code:
pinMode(10, OUTPUT); /* system chip select for the atmega board */
digitalWrite(10 HIGH);

Which is the RFM69 lib? https://github.com/LowPowerLab/RFM69?

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").
Quote
Code:
#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

U8GLIB_SSD1306_128X64 oled(OLED_CLK,OLED_MOSI,OLED_CS,OLED_DC);
RFM69 radio;

Infact i would suggest to use
Code:
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.

Oliver


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

Ich kenne die von Dir verwendete Lib leider nicht, aber mit http://code.google.com/p/m2tklib 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: http://code.google.com/p/m2tklib/wiki/m2tklib

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: http://code.google.com/p/m2tklib/wiki/fnref#Init

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: http://code.google.com/p/m2tklib/wiki/t07
 
Grüße,
Oliver
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.

Oliver
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
Hi

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


Oliver
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
Hi

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.


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

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

Oliver
548  Using Arduino / Programming Questions / Re: LCD Menu question on: September 07, 2013, 04:06:18 am
See also here:
http://playground.arduino.cc//Main/InterfacingWithHardware#ui

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.

http://code.google.com/p/m2tklib/

Oliver
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
Code:
if ((int)GPS.angle>10<=45)
should be
Code:
if ((int)GPS.angle>10 && (int)GPS.angle<=45)

Oliver
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
Code:
#define HEIGHT 64
to
Code:
#define HEIGHT 40

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

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

U8glib requires the following pins:
Code:
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.

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

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

Oliver
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: http://www.buy-display.com/download/manual/ERM12864-6_Series_Manual.pdf.

My suggestion is to use the serial interface to connect this display to the Arduino. Lower part of this page: http://www.buy-display.com/download/interfacing/ERM12864-6_Interfacing.pdf. Also note, that this display requires an external var pot as shown in the schematics.

U8glib (http://code.google.com/p/u8glib/) should work here.

Oliver
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.

Oliver


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

Quote
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:
Code:
extern M2tk m2;
at the very beginning of your code, will make m2 available before the actual definition.

M2_BUTTON/M2_ROOT:
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
Code:
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):
Code:
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:
Code:
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.
Code:
/* multi selection */

#define MULTI_SELECT_CNT 3
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 ( msg == M2_STRLIST_MSG_GET_EXTENDED_STR ) {
    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) = {
    &el_muse_strlist,
    &el_muse_goto_top, 
};
M2_VLIST(el_muse_vlist, "c2", muse_list);
M2_ALIGN(top_el_muse, "-1|1W64H64", &el_muse_vlist);

Just some ideas...

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