Show Posts
Pages: 1 ... 35 36 [37] 38 39 ... 83
541  International / Deutsch / Re: Sommerzeitumstellung on: March 17, 2013, 11:27:39 am
In unsere DS1307 lib hatten wir damals eine Funktion eingebaut, mit der man prüfen kann, ob gerade die deutsche Sommerzeit aktiv ist:

http://code.google.com/p/ds1307new/wiki/Reference#isMEZSummerTime

Das funktioniert dann so, dass man seine gegebene Normal-Zeit (vom Server) um eine Stunde erhöht, wenn die obige Funtion 1 zurückliefert.

Implementierung: Zunächst werden Start und Ende der Sommerzeit berechnet. Dann wird geprüft, ob die aktuelle Zeit dazwischen liegt.

Die Lib kann man auch ohne einen angeschlossenen DS1307 verwenden, dann setzt man halt einfach die Zeit manuell (siehe Wiki).

Oliver

542  Using Arduino / Displays / Re: u8glib 1.11 function SleepOn don't work. on: March 15, 2013, 07:29:50 pm
ok, I have to investigate this more closely. I have currently only limited access to the u8glib project, but I hope to work on this topic next week.

Oliver
543  Using Arduino / Displays / Re: M2TKLIB - A User-Interface-Toolkit for the Arduino Hardware on: March 15, 2013, 11:42:48 am
Hi

Quote
Is there a signed flavour of uint8_t?
This should be "int8_t".

Quote
Also, what is the purpose of calling "m2.checkKey();" multiple times within the main loop?
A call to "checkKey()" polls the values of the rotary encoder and the other keys. There is no interrupt based check of the rotary encoder, instead M2tklib requires as much calls to "checkKey()" as possible.

Quote
I'm also confused about how i pass a value back through the callback procedure. I was looking at the example code and i'm unsure how i would use that. Say for example i wanted to do a Serial.print(); of the current S8NUM value for el_u1.
You need to use global variables to pass values to a callback procedure (as you did correctly in the second code example).

This will do the print for each changed value:
Code:
uint8_t global_value = 0;
 
uint8_t u8_cb(m2_rom_void_p element, uint8_t msg, uint8_t val)
{
  if ( msg == M2_U8_MSG_SET_VALUE )
  {
    global_value = val;
    Serial.print(global_value);
  }
  return global_value;
}

Oliver
544  Using Arduino / Displays / Re: u8glib 1.11 function SleepOn don't work. on: March 15, 2013, 11:24:29 am
Hi

Thanks for the hint. Procedure names are:
Code:
    void U8GLIB::sleepOn(void)
    void U8GLIB::sleepOff(void)

I will add this to the reference manual.

Thanks,
Oliver
545  Using Arduino / Programming Questions / Re: Menu for Display on: March 15, 2013, 11:12:40 am
Oh, that's the scroll bar. You seem to have 5 items. If the scrollbar is connected correctly with the strlist element, then you should be able to go down until the fifth element appears.
If not, let me see the code for the related strlist and vsb element.

Oliver
546  Using Arduino / Programming Questions / Re: Menu for Display on: March 12, 2013, 11:44:04 am
Hi

U8NUM and LABEL might have different size. The first one is selectable, the second one none. This has an effect on their size (selectable elements reserve space for their boarder) so the position might also be differnet.

"black squares"? Maybe you can send a picture. I do not understand what you mean by that.

Oliver
547  International / Deutsch / Re: Suche Tipps für Audio (WAV) Wiedergabe on: March 08, 2013, 01:59:52 pm
Beeindruckend fand ich ja dieses Projekt: http://elm-chan.org/works/sd8p/report.html
Der Entwickler ist auch Autor des "petit fat file system", einer besonders schnellen und schlanken FAT/SD library.
Pffs hatte ich auf den Arduino portiert und ist nun Teil von m2tklib: http://code.google.com/p/m2tklib/wiki/mas

Grüße,
Oliver

548  Using Arduino / Programming Questions / Re: Menu for Display on: March 08, 2013, 12:40:14 pm
It is difficult to understand your question. Maybe you could send the display results along with the code.
But in general: The x/y position of an element is not an absolute position. Instead, it is relative to the origin of the XY List. This could explain your different results.

Oliver
549  Using Arduino / Programming Questions / Re: Menu for Display on: March 07, 2013, 05:15:02 pm
ok, got your point. I personally think that both seperator are overwritten by elements at the same position (x17y1 and x17y3).
For example:
M2_LABELFN(el_v_lbl_SMonthStart,     fmt_x17y3c2, lbl_SMonthStart);
and
M2_LABEL(el_v_Timer_Specific_Sep_Start, fmt_x17y3b1, "/");
If i interpret your fmt statement correctly, than both elements are at the same position.

Oliver
550  Using Arduino / Programming Questions / Re: Menu for Display on: March 06, 2013, 01:23:58 pm
Quote
the separator into view timer is missing

I do not understand what you mean  smiley-sad
Is it a compiler error? If yes, please provide the full error message.

Oliver
551  Using Arduino / Programming Questions / Re: Menu for Display on: March 05, 2013, 01:20:40 pm
Hi

Fix is easy: You need to use m2_eh_6bs instead of m2_eh_4bs handler. See the function reference manual.

Oliver
552  Using Arduino / Programming Questions / Re: Menu for Display on: March 04, 2013, 05:59:38 pm
Hi

The code contains a programming error, use this:
Code:
const char *label_test(m2_rom_void_p element)
{
  static char s[4];
  sprintf(s,  "%02d", array[u8dev][4]);
  Serial.println(s);   // or LCD.print(s);
  return s;
}

Then, i would strongly suggest to read tutorial 8: http://code.google.com/p/m2tklib/wiki/t08

Oliver
553  Using Arduino / Displays / Re: U8GLIB and bitmap creation/display on: March 02, 2013, 05:49:58 pm
Quote
Could you explain me why or point me where to read about it?

Good question. Some years back, "const" was not required. For example this page http://www.nongnu.org/avr-libc/user-manual/pgmspace.html does not mention, that "const" is required along with PROGMEM. Indeed examples at http://www.nongnu.org/avr-libc/user-manual/pgmspace.html are wrong (meanwhile?).

After some search, i found this page: http://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Named-Address-Spaces.html
This is part of the release doc for gcc 4.7.1 which explains, that the "const" keyword is required for "read only data" like PROGMEM area.

Oliver
554  Using Arduino / Displays / Re: U8glib: Graphics Lib for LCDs and OLEDs on: March 02, 2013, 04:33:30 pm
I have finished release v1.11:
  * Support for T6963
  * Support for Arduino Due
  * Sleep Mode
  * 4x mode for ST7920
  * New C++ interface for ST7920

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

Oliver
555  Products / Arduino Due / Re: Arduino Due libraries (official and 3rd party) on: March 02, 2013, 04:30:30 pm
The graphics LCD (ST7565, UC1701, KS0108, ...) and OLED  (SSD1306, ...) library "U8glib" includes support for Arduino Due.

http://code.google.com/p/u8glib/   
Pages: 1 ... 35 36 [37] 38 39 ... 83