Bugs on compiling and monitor

Hello,
I'm using: Arduino IDE - 2.2.1. Board ESP32S2 (something like Lilygo T8 v1.1 with TFT display, microSD, WiFi). USB interface is CH340 with Windows 11 automatically installed drivers.
I've got 2 bugs and 1 discomfort:

  1. On some samples compiling IDE says that there is no such file. But Google tells that this file must be built into Arduino IDE. How to resolve this bug?
  2. Serial Monitor output display not a readable text, but some crap symbols - how to resolve?
  3. Arduino IDE does not save board name-type and force to choose the board on each IDE start which is annoying. Is it possible to save board for next IDE starts?

Make sure your baud rates are the same as the sketch!
Normally, esp32s are communicating with like 115200 around baud rates, but you get the idea

You need Serial.begin(); in the void setup() function...

Yes, you both right about question 2. Thanks!

What about questions 1 and 3?

Regarding (1), what does "on some samples" mean.

Please don't post screenshots; right click in the output window, click copy all and past the info hete in a post (don't forget to use code tags when posting error messages).

Regarding (3), it should remember it as far as I know. My Nanos with CH340 are remembered.

Hi @brov

The board selection is associated with the sketch. So when you open a sketch you saved previously, the IDE should automatically select the same board as you had selected the last time you used the sketch.

The saved sketches that were open when you exited Arduino IDE previously are reopened when you start Arduino IDE. The IDE will make the board and port selections that were previously associated with the sketches.

The only time this doesn't happen is if you didn't have any saved sketches open before, or if the saved sketches you did have open before are no longer accessible (e.g., you deleted the sketches from your hard drive since that time). In this case, Arduino IDE falls back on opening a new sketch. This is the only circumstances under which it is expected that no board will be selected in Arduino IDE.

1 Like

Obvious - compilation of IDE samples which does not need those files (red on screenshot) is OK.

Then why this forum gives possibility to past screenshots? And if you will think a little you will understand that screenshots have more useful information then just copy-past from lower Arduino IDE window. OK, I will try to use screenshots minimally, but sometimes to show situation more complete it's better to use screenshots. :stuck_out_tongue_winking_eye:

Not all libraries have been updated to be compatible with the ESP32. In this case the library is trying to include avr/pgmspace.h, which is not even used with an ESP32.

1 Like

I was using a cellphone at that moment; I could not read your screenshot (I did try).

Anyway, the TFT library that you're using seems to be written for AVR processors, not for ESP32. So you need to find another library.

For you, yes :smiley: For me it was not obvious as I could not read the screenshot.

1 Like

#1 - You probably missed a library file, but since you did not include the full error or the full sketch, you will never know. In your screen shot, it is impossible to tell, but each of the lines might or might not refer to another line... in this screen shot, each line refers to the next line. The number is the line number in the text (which you did not post).

#3 - When you remove your USB/Arduino, the computer may or may not remember your board. I use different Arduino, so I always need select the board and port.

For technical drawings, not programs and errors that go on for pages. Using the < CODE > button for programs and errors is a great feature of the forum.

1 Like

david_2018, sterretje
OK, now I understand, thanks. But it's a really strange that ESP32 samples library have samples for AVR which is not ESP32... :crazy_face:

Maybe this discourse forum needs some update to make images zooming on mobile more comfortable? :wink:

If you are referring to the listing under File > Examples in the Arduino IDE, the examples shown as compatible are based off the architecture setting within a library's library.properties file. That does not always get updated regularly (or at all) when new processors are added to the IDE, and is dependent on whoever maintains the library.

The particular file you are having the error with is usually only conditionally included when using older versions of the IDE, or for unknown boards, because it is included automatically in the more current versions of the IDE. The file actually exists in the ESP32 boards package, but as a core library that is always included, in order to allow sketches that use PROGMEM specific code to run on the ESP32.

2 Likes

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