ESP32 & print println & printf is not working with #include <cstdio>


I am trying to port the MFRC522 software from Arduino (Miguel Balboa) github to ESP32.
There is nothing in the serial monitor apart strange characters.

I tried to instanciate Print class but is virtual so is not possible.

Could you help me please.

Jose Michel

Then probably the baud rate is wrong. The standard baud rate in ESP32 environments is 115200. Did you use monitor_speed = 115200 in the platformio.ini?

You are not supposed to create an object of that one. In Arduino you have the Serial object globally available, which is an instance of HardwareSerial, which implements the Print interface. See the documentation. Using std::cout instead of Serial in Arduino firmwares is quite unusual.

1 Like