Hello,
I am a beginners with Arduino (but I was an IT engineer once...).
I'have got a black screen on my display when I try the demo of here :
With this simple code :
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("Hello, World!");
delay(2000);
}
I am using Arduino IDE 2.3.6 and library esp32 by Espressif 2.0.12.
The compilation seems good and the upload as well :
Compressed 245360 bytes to 135841...
Writing at 0x00010000... (11 %)
Writing at 0x0001d879... (22 %)
Writing at 0x00024046... (33 %)
Writing at 0x00029370... (44 %)
Writing at 0x0002e896... (55 %)
Writing at 0x00036b31... (66 %)
Writing at 0x0003f207... (77 %)
Writing at 0x000446ef... (88 %)
Writing at 0x0004a172... (100 %)
Wrote 245360 bytes (135841 compressed) at 0x00010000 in 2.6 seconds (effective 743.2 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
But I have strange words in the Serial Monitor instead of Hello World and nothing on the screen :
It is normal to see this type of output in Serial Monitor when the ESP32-based board starts running the sketch program. The reason is that this microcontroller has a built-in program called a "bootloader", which runs for a short time when the microcontroller starts. The bootloader prints some debugging information to serial at 115200 baud.
The bootloader output is only useful in the case where you need to troubleshoot an unexpected reset of your sketch program during runtime. In other cases, you can simply ignore that initial cryptic output from the board.
You will find it helpful to add a couple of blank lines of output at the start of your sketch program to visually separate the sketch output from the bootloader output. You can do this by adding the following lines of code immediately after the Serial.begin call in your sketch:
Serial.println();
Serial.println();
Although the presence of the cryptic bootloader output is expected, the absence of the "Hello, World!" is of course unexpected.
Which specific board do you have selected from Arduino IDE's Tools > Board menu?
Do you have "115200" selected from the baud rate menu at the top right corner of the "Serial Monitor" panel in the Arduino IDE window?
This is expected. If you want to use the display, you must add code to your sketch that does that. Serial.println only outputs data to the board's serial port. It does not send text to the display.
It looks like Waveshare provides a library to facilitate writing such code:
Hello,
Thanks for your help.
I did aswell this modification in the property of the USB-Enhanced-Serial CH343(COM3) in the computer manager, and it worked !