Megatronics 2.0 on board SD card and smart LCD

Hi,

I am not able to read from the micro-sd card reader on the megatronics 2.0 board. I have everything setup with the full graphics LCD display but do not see any files when I press on the SD card option in the menu of the LCD. There are some files on there and I was able to read them on another printer directly from the LCD screen ( using a micro-SD to SD adapter) plugges to a R.A.M.P.S. 1.4

I have in pins.h, under 701 ( megatronics 2.0) : 

#define ORIG_SDCARDDETECT -1 // Ramps does not use this port
#define SDPOWER            -1
#define SDSS               53...

...
#define SCK_PIN          52
#define MISO_PIN         50
#define MOSI_PIN         51

and in configuration.h

#ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
#define SDSUPPORT 1
#define SDCARDDETECT ORIG_SDCARDDETECT
#define SDCARDDETECTINVERTED 0

Not sure what is wrong. Guidance would be apreciated, 

Comments

  • You should check the lcd controller selected in ui.h. If it has a sd card defined it will override your settings from configuration.h. Also make sure it supports the board/controller combination. Not all combinations have preset values that make sense.
  • Thanks for your reply,

    The Featured_Controller is 11, the reprap discount full graphics LCD which I am assuming is reffered to in ui.h as 
    COINTROLLER_REPRAPDISCOUNT_GLCD

    I see:

    #if FEATURE_CONTROLLER == CONTROLLER_SMARTRAMPS || FEATURE_CONTROLLER == CONTROLLER_GADGETS3D_SHIELD || FEATURE_CONTROLLER == CONTROLLER_BAM_DICE_DUE || (FEATURE_CONTROLLER == CONTROLLER_REPRAPDISCOUNT_GLCD && MOTHERBOARD != CONTROLLER_FELIX_DUE)
    #undef SDCARDDETECT
    #define SDCARDDETECT 49
    #undef SDCARDDETECTINVERTED
    #define SDCARDDETECTINVERTED 0
    #undef SDSUPPORT
    #define SDSUPPORT 1


    I'm not sure what has to be switched around here. How should I remove the features in ui.h that override the setting in configuration.h 
    Further, it seems odd to me that, in pin.h, under board 701 ( megatronics 2.0) there is

    #define ORIG_SDCARDDETECT -1

    as there must be a pin that detects the built-in micro-SD card on the megatronics 2.0, what exactly is ORIG_SDCARDDETECT?

    Thank you.
  • Hi

    I've been playing around with the megatronics V3 and the reprapdiscount myself. There are definitely a lot of tweaks to be made and figured out before getting it to work with repetier firmware and gettings a fully usable board. But once it does, top notch stuff.

    This is what I did just now to get the SD support working from the megatronics board (at least it shows up on the lcd screen and reads the sd card, haven't tested a print yet but I don't see any issues there).

    in configuration.h (you already did this):

    #ifndef SDSUPPORT  // Some boards have sd support on board. These define the values already in pins.h
    #define SDSUPPORT 1
    #undef SDCARDDETECT
    #define SDCARDDETECT -1
    #define SDCARDDETECTINVERTED 0

    In ui.h I commented out the whole code actually because this would override the settings in configuration.h. Since we don't have SD support from the LCD controller we have no use for it (a RAMPS board would have use for it for example).

    #if FEATURE_CONTROLLER == CONTROLLER_SMARTRAMPS || FEATURE_CONTROLLER == CONTROLLER_GADGETS3D_SHIELD || FEATURE_CONTROLLER == CONTROLLER_BAM_DICE_DUE || (FEATURE_CONTROLLER == CONTROLLER_REPRAPDISCOUNT_GLCD && MOTHERBOARD != CONTROLLER_FELIX_DUE)
    /*#undef SDCARDDETECT
    #if MOTHERBOARD == 37
    #define SDCARDDETECT ORIG_SDCARDDETECT
    #define SDCARDDETECT 49
    #undef SDCARDDETECTINVERTED
    #define SDCARDDETECTINVERTED 0
    #undef SDSUPPORT
    #define SDSUPPORT 1*/

    Hope this helps.
Sign In or Register to comment.