Esp 12f doesn't communicate through serial

hello, i uploaded the code to get mac address of an esp but i only get weird chars at 115200 baudrate

#include <ESP8266WiFi.h>

void setup(){
  Serial.begin(115200);
  Serial.println();
  
  WiFi.mode(WIFI_STA);
  
  Serial.print("ESP8266 Board MAC Address:  ");
  Serial.println(WiFi.macAddress());
  Serial.println(WiFi.softAPmacAddress());
}
 
void loop(){

}

The serial monitor is set to 9600

i tried at both, the pic was from last baud set

I was having it set to nodemcu but it had to be set to generic esp8266 now it works !

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