Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD card keeps corrupting #22

Closed
Wallnutts opened this issue Sep 11, 2022 · 3 comments
Closed

SD card keeps corrupting #22

Wallnutts opened this issue Sep 11, 2022 · 3 comments

Comments

@Wallnutts
Copy link

This happens randomly when transfering images from my gameboy camera to the ESP32. The oled screen would be stuck at the printer idle screen where it hangs and pressing the button does not do anyth unless i restart the ESP32.

It would then boot into either access point webserver mode with a 404 webpage on its IP and the usual gbprinter.local on the oled would be replaced by just .local.

OR

It would boot into the dumping screen with either 0 dumps or some impossibly large number. I can still transfer images but i would be stuck back at the printer idle screen with unresponsive buttons.

Am using a TTGO T8 1.7.1 with integrated sd card reader. Wired everything up properly as per my config file below:

/*********************************
 * GAMEBOY LINK CABLE DEFINITIONS
 *********************************/
// Note: Serial Clock Pin must be attached to an interrupt pin of the arduino (Pins 1 and 4 are not used)
//  ___________
// |  6  4  2  |
//  \_5__3__1_/   (at cable)
//
#define ESP_MOSI_PIN 23
#define ESP_MISO_PIN 19
#define ESP_CLK_PIN 18
#define INVERT_SERIAL_PINS //Invert pin 2 and 3 order, since the pin 2 goes o 3 in the other side of the cable, and 3 goes to 2. This is useful if you are using a breakout board for the link cable

/*****************************
 * SD CARD MODULE DEFINITIONS 
 *****************************/
//Define the SD Card Module Pins
#define SD_CS   13
#define SD_SCK  14
#define SD_MOSI 15
#define SD_MISO 2

/************************************
 * PUSH BUTTON AND IMAGE DEFINITIONS 
 ************************************/
#define BTN_PUSH 34             // Define a PushButton to use to Force a new file/Generate the images.
//#define BTN_INVERT            //Define to use the LOW state instead HIGH state. Useful for the TTGO board.
#define BMP_UPSCALE_FACTOR 1    //Set the Upscale factor for the BMP output (Set 0 to disable)
#define PNG_UPSCALE_FACTOR 1    //Set the Upscale factor for the PNG output (Set 0 to disable)

/***************************
 * OLED DISPLAY DEFINITIONS
 ***************************/
#define USE_OLED        //Enable OLED

//Uncomment this if you are using SSD1306 display driver (I2C)
#define USE_SSD1306
#define OLED_SDA 21
#define OLED_SCL 22
#define OLED_COMPINS 1 //If you have some issues with the image, try to change this with values between 1 and 4

//Uncomment this if you are using SSD1331 display driver (SPI)
//#define USE_SSD1331
//#define OLED_SCLK 14
//#define OLED_MOSI 13
//#define OLED_MISO 12
//#define OLED_CS   15
//#define OLED_DC   16
//#define OLED_RST   4

//Set your display dimensions
#define SCREEN_WIDTH 128
#define SCREEN_HEIGHT 32
//#define OLED_ROTATE   //Rotate the display by 180°

/*************************
 * LED STATUS DEFINITIONS
 *************************/
// Standard LED Definitions
#define LED_STATUS_PIN    1       // LED blink on packet reception (2 is internal LED)

// RGB LED Definitions
//#define LED_STATUS_BLUE  17
//#define LED_STATUS_RED   16
//#define LED_STATUS_GREEN 4
//#define COMMON_ANODE
//#define COMMON_CATHODE

/*************************
 * WEB SERVER DEFINITIONS
 *************************/
#define ENABLE_WEBSERVER
#define WIFI_CONNECT_TIMEOUT 10000              //Connection Timeout in ms

/*************************
 * RTC DEFINITIONS
 *************************/
 #define RTC_TIMEZONE -3 //Define your timezone
 #define RTC_TIMEDIFF 0 //Define the time difference between the NTP server and the real time
@zenaro147
Copy link
Owner

Hi! @Wallnutts

Can you tell me the class of your SD card?
I'm asking that because during the development for this board, we found a similar issue, but was solved after change to a Class 10 SD card.

Do you have conditions to make this test too?

@Wallnutts
Copy link
Author

I was using a generic sd card. I have changed to a class 10 card now and it seems to work so far and i was able to dump all 30 images off my gameboy camera with no issue. This issue seems to be resolved for the moment and will update in the future if it happens again. Thanks for your help!

@zenaro147
Copy link
Owner

I was using a generic sd card. I have changed to a class 10 card now and it seems to work so far and i was able to dump all 30 images off my gameboy camera with no issue. This issue seems to be resolved for the moment and will update in the future if it happens again. Thanks for your help!

Good to know that!

And thanks to share this! During the development, we didn't know if this could be a isolated issue or a general issue with the TTGO board.
I'll add a note at the documentation about that for TTGO boards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants