Serial ouput issue

Posted this on the ESP32 forum, but there is much more traffic here then there.

I have been working on a design using an esp32-wroom-ue-n8. Having 2 issues and I think they are both related.

In order to upload a sketch in Arudino I have to jumper io0 to gnd. This isn't a huge deal cause I could just add a tact switch but would like to avoid that.

The bigger issue though is that I am not getting any serial output when using serial programs such as Putty or Teraterm but I get serial output when using Serial Monitor within Arduino. I havent seen this happen before. Thinking it may be code I uploaded a simple Wire Scan sketch to rule it out. Same results. I should see the results of the scan info. And yes, I am only opening 1 serial app at a time. If I close Serial Monitor then open Putty or Teraterm using the same com port & baud I should see the information running.

I think the 2 are related. The schematic is based on the Wemos D1 mini esp32.

What do I have wrong on the board that would cause both of these issues?

Screenshot from within Arudino & schematic attached.
esp32 schematic.pdf (53.4 KB)

Anyone have any ideas about why Serial Monitor displays data but any external serial software doesn't?

Do the baud rates match ?

Are you keeping the IDE open to use its serial monitor or closing the IDE to use a seperate terminal program ?

Where is your sketch so that people can see if it is a sketch issue ?

Serial2 - or what?
(Keep us in the dark, it's more fun that way.)

#include "Wire.h"

void setup() {
  Serial.begin(9600);
  Wire.begin();
}

void loop() {
  byte error, address;
  int nDevices = 0;

  delay(5000);

  Serial.println("Scanning for I2C devices ...");
  for(address = 0x01; address < 0x7f; address++){
    Wire.beginTransmission(address);
    error = Wire.endTransmission();
    if (error == 0){
      Serial.printf("I2C device found at address 0x%02X\n", address);
      nDevices++;
    } else if(error != 2){
      Serial.printf("Error %d at address 0x%02X\n", error, address);
    }
  }
  if (nDevices == 0){
    Serial.println("No I2C devices found");
  }
}

The code is the Wire Scan example.
Serial monitor has to be closed in order for anything else to open the com port. But, yes Serial monitor is being closed then Putty or TeraTerm being opened. Same com port & baud.

So how does that go if Serial2 is used? Or "classic bluetooth"?

Where are you getting Serial2 from? There is no BT being used on the sketch, it simply should be outputting the serial data no matter what the serial program is provided the com port & baud are correct.

Sorry, I won't bother you further.

1 Like

Wire scan from which source / library ?
BTW it does not compile for an ESP, MEGA or MKR board here.

C:\Users\xxxxxxx\AppData\Local\Temp\.arduinoIDE-unsaved2023414-20704-wmkygm.bkvgk\sketch_may14b\sketch_may14b.ino: In function 'void loop()':
C:\Users\xxxxxx\AppData\Local\Temp\.arduinoIDE-unsaved2023414-20704-wmkygm.bkvgk\sketch_may14b\sketch_may14b.ino:19:14: error: 'class HardwareSerial' has no member named 'printf'; did you mean 'print'?
       Serial.printf("I2C device found at address 0x%02X\n", address);
              ^~~~~~
              print
C:\Users\xxxxxxxx\AppData\Local\Temp\.arduinoIDE-unsaved2023414-20704-wmkygm.bkvgk\sketch_may14b\sketch_may14b.ino:22:14: error: 'class HardwareSerial' has no member named 'printf'; did you mean 'print'?
       Serial.printf("Error %d at address 0x%02X\n", error, address);
              ^~~~~~
              print
Multiple libraries were found for "Wire.h"
  Used: C:\Users\xxxxxxxx\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6\libraries\Wire
  Not used: D:\Arduino sketches an libs\libraries\Wire
exit status 1

Compilation error: 'class HardwareSerial' has no member named 'printf'; did you mean 'print'?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.