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

Examples have no Serial output on Arduino Nano ESP32 #24

Open
VeloSteve opened this issue Jan 2, 2024 · 0 comments
Open

Examples have no Serial output on Arduino Nano ESP32 #24

VeloSteve opened this issue Jan 2, 2024 · 0 comments

Comments

@VeloSteve
Copy link

Operating System

Windows 11

IDE version

2.2.1

Board

Arduino Nano ESP32

BSP version

2.0.13

SPIFlash Library version

Automatically included?

Sketch

The included example SdInfo. I got the same results from BufferedPrint.

What happened ?

When running the example there is no Serial output at all. This on a Nano ESP32 which has been writing Serial output every day, still connected the same way.

The problem does not appear to be SD related.

How to reproduce ?

  1. Go to File -> Examples -> SdFat - Adafruit Fork -> SdInfo
  2. Click the arrow to install and upload.
  3. Check the Serial Monitor
  4. Nothing there

This does not seem to be SD related. I added a single Serial.println before any SD-related coded and it still does nothing:

void setup() {
  Serial.begin(9600);
  // Wait for USB Serial
  while (!Serial) {
    yield();
  }
  Serial.println("Anything?");  // NEW LINE
  cout << F("SdFat version: ") << SD_FAT_VERSION_STR << endl;
  printConfig(SD_CONFIG);

}

A workaround is simple enough. Change setup() to this and the example works perfectly:

void setup() {
  Serial.begin(9600);
  // Wait for USB Serial
  delay(5000);  // Fixed delay instead of a while()
  cout << F("SdFat version: ") << SD_FAT_VERSION_STR << endl;
  printConfig(SD_CONFIG);
}

This may not be the best code to put into the repository, but it works!

Debug Log

No response

Screenshots

No response

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

1 participant