Arduino IDE 2.1.0

I spend a lot of Time with Serial.println() in a short programm but I do not get it running. I would like to do it, in fact of none Debugging possibilities!

This is my small Programm:

/*ESP32-DevKitC. The programm flashes the LED every second

*Programm: blink1

*************************************************************/

#define LED 23

void setup()

{

pinMode(LED, OUTPUT);

}

void loop() {

digitalWrite(LED, HIGH);

Serial.println("LED ist ON");

delay(500);

digitalWrite(LED, LOW);

delay(500);

Serial.println("LED ist off");

}

I cannot see the Serial.println() anywhere! So, does someone can help me out? By the way, I use the ESP32!

With best regards,
Reinhold

Add a Serial.begin() with the correct baudrate in de setup() function.

Hello,
thank you very much for your Help!!! Do you know a good debugging Tool for the Arduino? The Arduino 2.1.0 has a Button for it on the left side but...!

With best regards,
Reinhold

I only use AVR based boards (that don't support debugging) so have no idea. I will leave your topic in the current category because of the additional question but it if my suggestion solved your problem it should actually have been posted in "Programming Questions" or "Advice on your Project".

Hello,

here is the same problem again. The Serial Monito do not output what I expected! Would you please so kind and look to the screen shoot?

/***************************************************************************
*Program: Christmas
*/

int LEDs[] = { 23, 22, 1, 3 };
unsigned char Ran;

void setup() {
  Serial.begin(115200);
  unsigned char i;
  for (i = 0; i <= 3; i++) {
    pinMode(LEDs[i], OUTPUT);
  }

  randomSeed(10);
}

//
// Turn ON the appropiate LED
//

void Display(unsigned char No) {

  digitalWrite(23, (No & B00001000)); //B00001000 = 8
  digitalWrite(22, (No & B00000100)); //B00000100 = 4
  digitalWrite(1, (No & B00000010));  //B00000010 = 2
  digitalWrite(3, (No & B00000001));  //B00000001 = 1
}

//
// Turn ON/OFF the LEDs by generating a random numner
// between q and 15
//
void loop() {

  int Ran = random(1, 16);
  Serial.println(Ran);
  Display(Ran);

  delay(1000);
}

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