stepper mit lcd ansteuern

hallo meine lieben leute, ich breuchte dringend HILFE bei meinem Projekt!?!?!?
hab mir folgende Hardware geholt:

nun hätte ich vor mit den lcd display 2stepper anzusteuern, die accelstepper.h behersche ich ausreichend.
Ich möchte nun ein menü auf den display erzeugen mit verschiedenen Programmabläufen z.b.
ablauf1 → stepper1 move 200 stepper 2 move 300
ablauf2 → stepper1 move 300 stepper 2 move 400 usw.

kann mir da irgendwer einen tipp geben???

hab dieses beispiel im internet gefunden, das soweit auch funktioniert:

// ============================================================                                                            
// Example:     LCDML: grafik display with u8g                        
// ============================================================
// Autor:       Nils Feldkämper
// Last update: 08.01.2017
// License:     MIT                                     
// ============================================================ 
// Descripton: 
// This example shows how to use the u8glib with the lcdmenulib
// The menu can placed in a box that can be placed anywhere on 
// the screen.  
// ============================================================ 

 // include libs
 #include <LCDMenuLib.h>
 #include <U8glib.h>
 
 // lib config
 #define _LCDML_DISP_cfg_button_press_time          200    // button press time in ms

// *********************************************************************
// U8GLIB
// *********************************************************************
 // setup u8g object, please remove comment from one of the following constructor calls
 // IMPORTANT NOTE: The following list is incomplete. The complete list of supported 
 // devices with all constructor calls is here: https://github.com/olikraus/u8glib/wiki/device
 U8GLIB_ST7920_128X64 u8g(23, 17, 16, U8G_PIN_NONE); 
 
 // settings for u8g lib and lcd
 #define _LCDML_DISP_w                 128            // lcd width
 #define _LCDML_DISP_h                 64             // lcd height
 // font settings
 #define _LCDML_DISP_font              u8g_font_6x13  // u8glib font (more fonts under u8g.h line 1520 ...)
 #define _LCDML_DISP_font_w            6              // font width
 #define _LCDML_DISP_font_h            13             // font heigt  
 // cursor settings
 #define _LCDML_DISP_cursor_char       "X"            // cursor char
 #define _LCDML_DISP_cur_space_before  2              // cursor space between
 #define _LCDML_DISP_cur_space_behind  4              // cursor space between  
 // menu position and size
 #define _LCDML_DISP_box_x0            0              // start point (x0, y0)
 #define _LCDML_DISP_box_y0            0              // start point (x0, y0)
 #define _LCDML_DISP_box_x1            128            // width x  (x0 + width)
 #define _LCDML_DISP_box_y1            64             // hight y  (y0 + height)
 #define _LCDML_DISP_draw_frame        1              // draw a box around the menu
  // scrollbar width
 #define _LCDML_DISP_scrollbar_w       6  // scrollbar width (if this value is < 3, the scrollbar is disabled)    

 // nothing change here
 #define _LCDML_DISP_cols_max          ((_LCDML_DISP_box_x1-_LCDML_DISP_box_x0)/_LCDML_DISP_font_w) 
 #define _LCDML_DISP_rows_max          ((_LCDML_DISP_box_y1-_LCDML_DISP_box_y0-((_LCDML_DISP_box_y1-_LCDML_DISP_box_y0)/_LCDML_DISP_font_h))/_LCDML_DISP_font_h) 

 // rows and cols 
 // when you use more rows or cols as allowed change in LCDMenuLib.h the define "_LCDML_DISP_cfg_max_rows" and "_LCDML_DISP_cfg_max_string_length"
 // the program needs more ram with this changes
 #define _LCDML_DISP_rows              _LCDML_DISP_rows_max  // max rows 
 #define _LCDML_DISP_cols              20                   // max cols


  


// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
 // create menu
 // menu element count - last element id
 // this value must be the same as the last menu element
 #define _LCDML_DISP_cnt    16
 
 // LCDML_root        => layer 0 
 // LCDML_root_X      => layer 1 
 // LCDML_root_X_X    => layer 2 
 // LCDML_root_X_X_X  => layer 3 
 // LCDML_root_... => layer ... 
 
 // LCDMenuLib_add(id, group, prev_layer_element, new_element_num, lang_char_array, callback_function)
 LCDML_DISP_init(_LCDML_DISP_cnt);
 LCDML_DISP_add      (0  , _LCDML_G1  , LCDML_root        , 1  , "Cocktail 1"        , LCDML_FUNC_information);
 LCDML_DISP_add      (1  , _LCDML_G1  , LCDML_root        , 2  , "Cocktail 2"          , LCDML_FUNC_timer_info);
 LCDML_DISP_add      (2  , _LCDML_G1  , LCDML_root        , 3  , "Settings"           , LCDML_FUNC);
 LCDML_DISP_add      (3  , _LCDML_G1  , LCDML_root_3      , 1  , "Change value"       , LCDML_FUNC);
 LCDML_DISP_add      (4  , _LCDML_G1  , LCDML_root_3      , 2  , "Something"          , LCDML_FUNC);
 LCDML_DISP_add      (5  , _LCDML_G1  , LCDML_root        , 4  , "Program"            , LCDML_FUNC);
 LCDML_DISP_add      (6  , _LCDML_G1  , LCDML_root_4      , 1  , "Program 1"          , LCDML_FUNC);
 LCDML_DISP_add      (7  , _LCDML_G1  , LCDML_root_4_1    , 1  , "P1 start"           , LCDML_FUNC);
 LCDML_DISP_add      (8  , _LCDML_G1  , LCDML_root_4_1    , 2  , "Settings"           , LCDML_FUNC);
 LCDML_DISP_add      (9  , _LCDML_G1  , LCDML_root_4_1_2  , 1  , "Warm"               , LCDML_FUNC);
 LCDML_DISP_add      (10 , _LCDML_G1  , LCDML_root_4_1_2  , 2  , "Long"               , LCDML_FUNC);
 LCDML_DISP_add      (11 , _LCDML_G1  , LCDML_root_4      , 2  , "Program 2"          , LCDML_FUNC_p2);
 LCDML_DISP_add      (12 , _LCDML_G1  , LCDML_root        , 5  , "Mode"               , LCDML_FUNC);
 LCDML_DISP_add      (13 , _LCDML_G1  , LCDML_root        , 6  , "Serial No."         , LCDML_FUNC);
 LCDML_DISP_add      (14 , _LCDML_G1  , LCDML_root        , 7  , "Display Type"       , LCDML_FUNC);
 LCDML_DISP_add      (15 , _LCDML_G1  , LCDML_root        , 8  , "Something 1"        , LCDML_FUNC);
 LCDML_DISP_add      (16 , _LCDML_G1  , LCDML_root        , 9  , "Something 2"        , LCDML_FUNC);
 LCDML_DISP_createMenu(_LCDML_DISP_cnt);



// ********************************************************************* 
// LCDML BACKEND (core of the menu, do not change here anything yet)
// ********************************************************************* 
 // define backend function  
 #define _LCDML_BACK_cnt    1  // last backend function id
 
 LCDML_BACK_init(_LCDML_BACK_cnt);
 LCDML_BACK_new_timebased_dynamic (0  , ( 20UL )         , _LCDML_start  , LCDML_BACKEND_control);
 LCDML_BACK_new_timebased_dynamic (1  , ( 10000000UL )   , _LCDML_stop   , LCDML_BACKEND_menu);
 LCDML_BACK_create();



// *********************************************************************
// SETUP
// *********************************************************************
 void setup()
 {  
   // serial init; only be needed if serial control is used 
   while(!Serial);                    // wait until serial ready
   Serial.begin(9600);                // start serial    
   Serial.println(F(_LCDML_VERSION)); // only for examples
     
   // Enable all items with _LCDML_G1
   LCDML_DISP_groupEnable(_LCDML_G1); // enable group 1
 
   // LCDMenu Setup
   LCDML_setup(_LCDML_BACK_cnt);  
 }

// *********************************************************************
// LOOP
// *********************************************************************
 void loop()
 {
   // this function must called here, do not delete it
   LCDML_run(_LCDML_priority); 
 }

// *********************************************************************
// check some errors - do not change here anything
// *********************************************************************
# if(_LCDML_DISP_rows > _LCDML_DISP_cfg_max_rows)
# error change value of _LCDML_DISP_cfg_max_rows in LCDMenuLib.h
# endif

# if(_LCDML_DISP_cols > _LCDML_DISP_cfg_max_string_length)
# error change value of _LCDML_DISP_cfg_max_string_length in LCDMenuLib.h
# endif

# if(_LCDML_glcd_tft_box_x1 > _LCDML_glcd_tft_w)
# error _LCDML_glcd_tft_box_x1 is to big
# endif

# if(_LCDML_glcd_tft_box_y1 > _LCDML_glcd_tft_h)
# error _LCDML_glcd_tft_box_y1 is to big
# endif

aber wie zum teufel kann ich nun eine Ebene so deklarieren, dass meine stepper am ramps 1.4 angespringen???

Bin um jeder hilfe froh!

Komplettes example i. A.

Vielen Dank im Voraus!

LG

mechastef:
kann mir da irgendwer einen tipp geben???

Zunächst wäre gut, wenn Du den Code in Code-Tags fassen würdest, damit er les- und scrollbar wird. Du kannst das auch nachträglich tun: Posting bearbeiten, Code markieren, Code-Tag in der Symbolleiste (ganz links) klicken, speichern.

Gruß

Gregor

Nachdem du den Sketch in Code-Tags gepackt hast kannst du uns gern mitteilen, was du bisher probiert hast.

Ich verstehe auch nicht was Du gemacht hast und was genau nicht geht.

uwefed:
Ich verstehe auch nicht was Du gemacht hast und was genau nicht geht.

Das ist total blöd und passt dem OP bestimmt nicht. Schließlich schreibt er was von dringend.

Gruß

Gregor

gregorss:
Das ist total blöd und passt dem OP bestimmt nicht. Schließlich schreibt er was von dringend.

Das ist sein Problem. :wink:

Mit Copy&Paste kommt man nun mal nicht weit.

Ein wenig Eigeninitiative (nicht nur Copy&Paste) sollte schon vorhanden sein.

Und warum fragt er nicht den Autor des kopierten Sketches und bleibt damit im entsprechenden Thread ?

// ============================================================                                                            
// Example:     LCDML: grafik display with u8g                        
// ============================================================
// Autor:       Nils Feldkämper
// Last update: 08.01.2017
// License:     MIT                                     
// ============================================================ 
// Descripton: 
// This example shows how to use the u8glib with the lcdmenulib
// The menu can placed in a box that can be placed anywhere on 
// the screen.  
// ============================================================ 

  // include libs
  #include <LCDMenuLib.h>
  #include <U8glib.h>
  
  // lib config
  #define _LCDML_DISP_cfg_button_press_time          200    // button press time in ms

// *********************************************************************
// U8GLIB
// *********************************************************************
  // setup u8g object, please remove comment from one of the following constructor calls
  // IMPORTANT NOTE: The following list is incomplete. The complete list of supported 
  // devices with all constructor calls is here: https://github.com/olikraus/u8glib/wiki/device
  U8GLIB_ST7920_128X64 u8g(23, 17, 16, U8G_PIN_NONE); 
  
  // settings for u8g lib and lcd
  #define _LCDML_DISP_w                 128            // lcd width
  #define _LCDML_DISP_h                 64             // lcd height
  // font settings
  #define _LCDML_DISP_font              u8g_font_6x13  // u8glib font (more fonts under u8g.h line 1520 ...)
  #define _LCDML_DISP_font_w            6              // font width
  #define _LCDML_DISP_font_h            13             // font heigt  
  // cursor settings
  #define _LCDML_DISP_cursor_char       "X"            // cursor char
  #define _LCDML_DISP_cur_space_before  2              // cursor space between
  #define _LCDML_DISP_cur_space_behind  4              // cursor space between  
  // menu position and size
  #define _LCDML_DISP_box_x0            0              // start point (x0, y0)
  #define _LCDML_DISP_box_y0            0              // start point (x0, y0)
  #define _LCDML_DISP_box_x1            128            // width x  (x0 + width)
  #define _LCDML_DISP_box_y1            64             // hight y  (y0 + height)
  #define _LCDML_DISP_draw_frame        1              // draw a box around the menu
   // scrollbar width
  #define _LCDML_DISP_scrollbar_w       6  // scrollbar width (if this value is < 3, the scrollbar is disabled)    

  // nothing change here
  #define _LCDML_DISP_cols_max          ((_LCDML_DISP_box_x1-_LCDML_DISP_box_x0)/_LCDML_DISP_font_w) 
  #define _LCDML_DISP_rows_max          ((_LCDML_DISP_box_y1-_LCDML_DISP_box_y0-((_LCDML_DISP_box_y1-_LCDML_DISP_box_y0)/_LCDML_DISP_font_h))/_LCDML_DISP_font_h) 

  // rows and cols 
  // when you use more rows or cols as allowed change in LCDMenuLib.h the define "_LCDML_DISP_cfg_max_rows" and "_LCDML_DISP_cfg_max_string_length"
  // the program needs more ram with this changes
  #define _LCDML_DISP_rows              _LCDML_DISP_rows_max  // max rows 
  #define _LCDML_DISP_cols              20                   // max cols
 
 
   


// *********************************************************************
// LCDML MENU/DISP
// *********************************************************************
  // create menu
  // menu element count - last element id
  // this value must be the same as the last menu element
  #define _LCDML_DISP_cnt    16
  
  // LCDML_root        => layer 0 
  // LCDML_root_X      => layer 1 
  // LCDML_root_X_X    => layer 2 
  // LCDML_root_X_X_X  => layer 3 
  // LCDML_root_... => layer ... 
  
  // LCDMenuLib_add(id, group, prev_layer_element, new_element_num, lang_char_array, callback_function)
  LCDML_DISP_init(_LCDML_DISP_cnt);
  LCDML_DISP_add      (0  , _LCDML_G1  , LCDML_root        , 1  , "Cocktail 1"        , LCDML_FUNC_information);
  LCDML_DISP_add      (1  , _LCDML_G1  , LCDML_root        , 2  , "Cocktail 2"          , LCDML_FUNC_timer_info);
  LCDML_DISP_add      (2  , _LCDML_G1  , LCDML_root        , 3  , "Settings"           , LCDML_FUNC);
  LCDML_DISP_add      (3  , _LCDML_G1  , LCDML_root_3      , 1  , "Change value"       , LCDML_FUNC);
  LCDML_DISP_add      (4  , _LCDML_G1  , LCDML_root_3      , 2  , "Something"          , LCDML_FUNC);
  LCDML_DISP_add      (5  , _LCDML_G1  , LCDML_root        , 4  , "Program"            , LCDML_FUNC);
  LCDML_DISP_add      (6  , _LCDML_G1  , LCDML_root_4      , 1  , "Program 1"          , LCDML_FUNC);
  LCDML_DISP_add      (7  , _LCDML_G1  , LCDML_root_4_1    , 1  , "P1 start"           , LCDML_FUNC);
  LCDML_DISP_add      (8  , _LCDML_G1  , LCDML_root_4_1    , 2  , "Settings"           , LCDML_FUNC);
  LCDML_DISP_add      (9  , _LCDML_G1  , LCDML_root_4_1_2  , 1  , "Warm"               , LCDML_FUNC);
  LCDML_DISP_add      (10 , _LCDML_G1  , LCDML_root_4_1_2  , 2  , "Long"               , LCDML_FUNC);
  LCDML_DISP_add      (11 , _LCDML_G1  , LCDML_root_4      , 2  , "Program 2"          , LCDML_FUNC_p2);
  LCDML_DISP_add      (12 , _LCDML_G1  , LCDML_root        , 5  , "Mode"               , LCDML_FUNC);
  LCDML_DISP_add      (13 , _LCDML_G1  , LCDML_root        , 6  , "Serial No."         , LCDML_FUNC);
  LCDML_DISP_add      (14 , _LCDML_G1  , LCDML_root        , 7  , "Display Type"       , LCDML_FUNC);
  LCDML_DISP_add      (15 , _LCDML_G1  , LCDML_root        , 8  , "Something 1"        , LCDML_FUNC);
  LCDML_DISP_add      (16 , _LCDML_G1  , LCDML_root        , 9  , "Something 2"        , LCDML_FUNC);
  LCDML_DISP_createMenu(_LCDML_DISP_cnt);



// ********************************************************************* 
// LCDML BACKEND (core of the menu, do not change here anything yet)
// ********************************************************************* 
  // define backend function  
  #define _LCDML_BACK_cnt    1  // last backend function id
  
  LCDML_BACK_init(_LCDML_BACK_cnt);
  LCDML_BACK_new_timebased_dynamic (0  , ( 20UL )         , _LCDML_start  , LCDML_BACKEND_control);
  LCDML_BACK_new_timebased_dynamic (1  , ( 10000000UL )   , _LCDML_stop   , LCDML_BACKEND_menu);
  LCDML_BACK_create();



// *********************************************************************
// SETUP
// *********************************************************************
  void setup()
  {  
    // serial init; only be needed if serial control is used 
    while(!Serial);                    // wait until serial ready
    Serial.begin(9600);                // start serial    
    Serial.println(F(_LCDML_VERSION)); // only for examples
      
    // Enable all items with _LCDML_G1
    LCDML_DISP_groupEnable(_LCDML_G1); // enable group 1
  
    // LCDMenu Setup
    LCDML_setup(_LCDML_BACK_cnt);  
  }

// *********************************************************************
// LOOP
// *********************************************************************
  void loop()
  {
    // this function must called here, do not delete it
    LCDML_run(_LCDML_priority); 
  }

// *********************************************************************
// check some errors - do not change here anything
// *********************************************************************
# if(_LCDML_DISP_rows > _LCDML_DISP_cfg_max_rows)
# error change value of _LCDML_DISP_cfg_max_rows in LCDMenuLib.h
# endif

# if(_LCDML_DISP_cols > _LCDML_DISP_cfg_max_string_length)
# error change value of _LCDML_DISP_cfg_max_string_length in LCDMenuLib.h
# endif

# if(_LCDML_glcd_tft_box_x1 > _LCDML_glcd_tft_w)
# error _LCDML_glcd_tft_box_x1 is to big
# endif

# if(_LCDML_glcd_tft_box_y1 > _LCDML_glcd_tft_h)
# error _LCDML_glcd_tft_box_y1 is to big
# endif

Die Lib is eben ziemlich groß mit mehr als 9000 char, desshalb ist es ziemlich umständlich den Code zu inkludieren.

Hier im Link könnte man den kompletten Code herunterladen wenn sich jemand den Aufwand antun möchte... (und ich sehr erfreut wäre...)

Im ersten Tab an diesem punkt:

// LCDMenuLib_add(id, group, prev_layer_element, new_element_num, lang_char_array, callback_function)
  LCDML_DISP_init(_LCDML_DISP_cnt);
  LCDML_DISP_add      (0  , _LCDML_G1  , LCDML_root        , 1  , "Cocktail 1"        , LCDML_FUNC_information);
  LCDML_DISP_add      (1  , _LCDML_G1  , LCDML_root        , 2  , "Cocktail 2"          , LCDML_FUNC_timer_info);
  LCDML_DISP_add      (2  , _LCDML_G1  , LCDML_root        , 3  , "Settings"           , LCDML_FUNC);
  LCDML_DISP_add      (3  , _LCDML_G1  , LCDML_root_3      , 1  , "Change value"       , LCDML_FUNC);
  LCDML_DISP_add      (4  , _LCDML_G1  , LCDML_root_3      , 2  , "Something"          , LCDML_FUNC);
  LCDML_DISP_add      (5  , _LCDML_G1  , LCDML_root        , 4  , "Program"            , LCDML_FUNC);
  LCDML_DISP_add      (6  , _LCDML_G1  , LCDML_root_4      , 1  , "Program 1"          , LCDML_FUNC);
  LCDML_DISP_add      (7  , _LCDML_G1  , LCDML_root_4_1    , 1  , "P1 start"           , LCDML_FUNC);
  LCDML_DISP_add      (8  , _LCDML_G1  , LCDML_root_4_1    , 2  , "Settings"           , LCDML_FUNC);
  LCDML_DISP_add      (9  , _LCDML_G1  , LCDML_root_4_1_2  , 1  , "Warm"               , LCDML_FUNC);
  LCDML_DISP_add      (10 , _LCDML_G1  , LCDML_root_4_1_2  , 2  , "Long"               , LCDML_FUNC);
  LCDML_DISP_add      (11 , _LCDML_G1  , LCDML_root_4      , 2  , "Program 2"          , LCDML_FUNC_p2);
  LCDML_DISP_add      (12 , _LCDML_G1  , LCDML_root        , 5  , "Mode"               , LCDML_FUNC);
  LCDML_DISP_add      (13 , _LCDML_G1  , LCDML_root        , 6  , "Serial No."         , LCDML_FUNC);
  LCDML_DISP_add      (14 , _LCDML_G1  , LCDML_root        , 7  , "Display Type"       , LCDML_FUNC);
  LCDML_DISP_add      (15 , _LCDML_G1  , LCDML_root        , 8  , "Something 1"        , LCDML_FUNC);
  LCDML_DISP_add      (16 , _LCDML_G1  , LCDML_root        , 9  , "Something 2"        , LCDML_FUNC);
  LCDML_DISP_createMenu(_LCDML_DISP_cnt);

ist der letzte punkt ja die callbackfunktion...

und am letzten tab:

/* ===================================================================== *
 *                                                                       *
 * DISPLAY SYSTEM                                                        *
 *                                                                       *
 * ===================================================================== *
 * every "disp menu function" needs three functions 
 * - void LCDML_DISP_setup(func_name)    
 * - void LCDML_DISP_loop(func_name)     
 * - void LCDML_DISP_loop_end(func_name)
 *
 * EXAMPLE CODE:
    void LCDML_DISP_setup(..menu_func_name..) 
    {
      // setup
      // is called only if it is started

      // starts a trigger event for the loop function every 100 millisecounds
      LCDML_DISP_triggerMenu(100);  
    }
    
    void LCDML_DISP_loop(..menu_func_name..)
    { 
      // loop
      // is called when it is triggert
      // - with LCDML_DISP_triggerMenu( millisecounds ) 
      // - with every button status change

      // check if any button is presed (enter, up, down, left, right)
      if(LCDML_BUTTON_checkAny()) {         
        LCDML_DISP_funcend();
      } 
    }
    
    void LCDML_DISP_loop_end(..menu_func_name..)
    {
      // loop end
      // this functions is ever called when a DISP function is quit
      // you can here reset some global vars or do nothing  
    } 
 * ===================================================================== * 
 */

// *********************************************************************
void LCDML_DISP_setup(LCDML_FUNC_information)
// *********************************************************************
{
  // setup function
  u8g.setFont(_LCDML_DISP_font);
  u8g.firstPage();  
  do {
    u8g.drawStr( 0, 13, F("To close this"));
    u8g.drawStr( 0, 26, F("function press"));
    u8g.drawStr( 0, 39, F("any button or use"));
    u8g.drawStr( 0, 52, F("back button"));
  } while( u8g.nextPage() );
}

void LCDML_DISP_loop(LCDML_FUNC_information) 
{
  // loop function, can be run in a loop when LCDML_DISP_triggerMenu(xx) is set
  // the quit button works in every DISP function without any checks; it starts the loop_end function   
  if(LCDML_BUTTON_checkAny()) { // check if any button is presed (enter, up, down, left, right)
    // LCDML_DISP_funcend calls the loop_end function
    LCDML_DISP_funcend();
  } 
}

void LCDML_DISP_loop_end(LCDML_FUNC_information)
{
  // this functions is ever called when a DISP function is quit
  // you can here reset some global vars or do nothing    
}  


// *********************************************************************
uint8_t g_func_timer_info = 0;  // time counter (global variable)
unsigned long g_timer_1 = 0;    // timer variable (globale variable)
void LCDML_DISP_setup(LCDML_FUNC_timer_info)
// *********************************************************************
{
  // setup function
  char buf[20];
  sprintf (buf, "wait %d secounds", 10);
  
  u8g.setFont(_LCDML_DISP_font);
  u8g.firstPage();  
  do {
    u8g.drawStr( 0, 13, buf);
    u8g.drawStr( 0, 26, F("or press back button"));
  } while( u8g.nextPage() );

     
  g_func_timer_info = 10;       // reset and set timer    
  LCDML_DISP_triggerMenu(100);  // starts a trigger event for the loop function every 100 millisecounds
}

void LCDML_DISP_loop(LCDML_FUNC_timer_info)
{ 
  // loop function, can be run in a loop when LCDML_DISP_triggerMenu(xx) is set
  // the quit button works in every DISP function without any checks; it starts the loop_end function 
  
  // this function is called every 100 millisecounds
  
  // this timer checks every 1000 millisecounds if it is called
  if((millis() - g_timer_1) >= 1000) {
    g_timer_1 = millis();   
    g_func_timer_info--;                // increment the value every secound
    char buf[20];
    sprintf (buf, "wait %d secounds", g_func_timer_info);
    
    u8g.setFont(_LCDML_DISP_font);
    u8g.firstPage();  
    do {
      u8g.drawStr( 0, 13, buf);
      u8g.drawStr( 0, 26, F("or press back button"));
    } while( u8g.nextPage() );   
  }
  
  // reset the initscreen timer
  LCDML_DISP_resetIsTimer();
  
  // this function can only be ended when quit button is pressed or the time is over
  // check if the function ends normaly
  if (g_func_timer_info <= 0)
  {
    // end function for callback
    LCDML_DISP_funcend();  
  }   
}

void LCDML_DISP_loop_end(LCDML_FUNC_timer_info) 
{
  // this functions is ever called when a DISP function is quit
  // you can here reset some global vars or do nothing
}

// *********************************************************************
uint8_t g_button_value = 0; // button value counter (global variable)
void LCDML_DISP_setup(LCDML_FUNC_p2)
// *********************************************************************
{ 
  // setup function
  // print lcd content
  char buf[17];
  sprintf (buf, "count: %d of 3", 0);
  
  u8g.setFont(_LCDML_DISP_font);
  u8g.firstPage();  
  do {
    u8g.drawStr( 0, 13, F("press a or w button"));
    u8g.drawStr( 0, 26, buf);
  } while( u8g.nextPage() );  

  // Reset Button Value
  g_button_value = 0; 
}

void LCDML_DISP_loop(LCDML_FUNC_p2)
{
  // loop function, can be run in a loop when LCDML_DISP_triggerMenu(xx) is set
  // the quit button works in every DISP function without any checks; it starts the loop_end function 
  
  if (LCDML_BUTTON_checkAny()) // check if any button is pressed (enter, up, down, left, right)
  {
    if (LCDML_BUTTON_checkLeft() || LCDML_BUTTON_checkUp()) // check if button left is pressed
    {
      LCDML_BUTTON_resetLeft(); // reset the left button
      LCDML_BUTTON_resetUp(); // reset the left button
      g_button_value++;
      
      // update lcd content
      char buf[17];
      sprintf (buf, "count: %d of 3", g_button_value);
      
      u8g.setFont(_LCDML_DISP_font);
      u8g.firstPage();  
      do {
        u8g.drawStr( 0, 13, F("press a or w button"));
        u8g.drawStr( 0, 26, buf);
      } while( u8g.nextPage() );        
    }    
  }
  
  // check if button count is three
  if (g_button_value >= 3) {
    // end function for callback
    LCDML_DISP_funcend();   
  } 
}

void LCDML_DISP_loop_end(LCDML_FUNC_p2) 
{
  // this functions is ever called when a DISP function is quit
  // you can here reset some global vars or do nothing
}

kann ich die callback funktionen ja deklarieren,
ich hab mir gedacht dass ich hier die accelstepper.h inkludiere und die jeweiligen callbacks dann mit meinen move stepper befehle ausfülle
bin ich da auf dem richtigen weg, oder totaler schwachsinn?!? =\

Und nochmal meine Frage:
Warum stellst du deine Frage nicht in dem Thread, aus dem du den Sketch (Library) kopiert hast ?
Da sprichst du den Autor direkt an.

Und nochmal, danke für den Hinweis! als hätte ich das nicht probiert...
Hätte gerne ne Lösung oder ein Ansatzweg
Würde auch ne Belohnung rausspringen (z.b. Überweisung auf PP-Konto oder ähnliches!!)
Man könnte auch nen anderen Code hernehmen, der Bsp-Code dient nur zur Projektvorstellung

LG

Stefan