This article will help you test out the SD card on your Megatronics and guide you on how to configure it in the firmware. First make sure the SD card is formatted using a FAT32 file system. Then insert the card into the Megatronics and plug in the USB cable.
To test if everything is ok, find the CardInfo example in the File -> Examples -> SD menu. Change the line
const int chipSelect = 4;
the number 4 to 53. After that, you can upload the sketch. Open Serial Monitor, and view the output. It should give something like:
Initializing SD card...Wiring is correct and a card is present.
Files found on the card (name, date and size in bytes): FILE.EXT 2018-07-19 19:05:36 9093270
This means that the file list was read successfully and everything works. If you encounter a problem, make sure that your PC can read the SD card and the SD card supports SPI.
To enable the use of SD cards in your firmware, in the configuration file, find the line
Uncomment (remove the //) to enable SD card support. After you upload the firmware, it should report a list of .g and .gcode files when you execute gcode M21 and then M20.
Dispatch same business day!
3.000+ products in our assortment
More than 45.000 satisfied customers in over 40 countries
Secure payment for all payment options
Professional tech support (over 10 years 3D experience)
25.000+ satisfied customers
Pay safely using
ReprapWorld is the number one webshop for all your reprap supplies for your 3D printer. We have a large collection of 3D printer components, from our famous electronics lines to filament from our own production. And everything is at a very competitive price!