Serial.print does not work (yes, Serial.begin is used).

I am going crazy. Such a simple sketch, yet I get nothing (but a wdt reset) on serial monitor. Look and see if you can tell me why the serial prints don’t function.

int i = 0;
void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
Serial.println("LED Finder");
for (i = 0;i < 17; i++) {
pinMode(i, OUTPUT);
}
}

void loop() {
  // put your main code here, to run repeatedly:
  
  Serial.print(i);
  Serial.print("HIGH");
  digitalWrite(i, HIGH);
  delay(500);
  Serial.println("LOW");
  digitalWrite(i, LOW);
  delay(500);
  i++;
  if (i > 16) i = 0;
}
}

Is your serial monitor also set to 115200?

I would not use pins 0, 1. Those are the Serial pins going to the USB adapter out to the PC. Use 2 up to 19 instead (14-19 are A0 to A5).

Which Arduino? Or is it an ESP8266?

Esp12E to be exact. Crosswoods, yeah it crashes but not before it has a chance to say something.

First of all, it's CrossRoads.

Second, is your serial output on any of the pins 0 to 17? If yes, free those pins up.

@OP

Are you expecting the following kind of message on the Serial Monitor?
sm58.png

sm58.png

Yep

mattlogue:
Yep

If I can get the result - why not you? Check your codes for any error. Do they compile?

CrossRoads, my apologies. I think I have discovered what I needed (number to a LED) and I have another bigger problem... for another thread.

It's just weird it doesn't work considering how simple it is...

You really need to do some study on the pin numbers and the esp8266.

The ide pin numbers you are using relate to the gpio pin numbers of the chip.

Pins 6—11 are used to connect flash memory chip on most modules. Trying to use these pins as IOs will likely cause the program to crash.

Verify which of the pin number below 6 are for general i/o and which are related to TX/RX.