Hello! I am using a simple code for my ESP32 (shown at the end of my question). I have uploaded it succesfully, but the problem is:
When I open my serial monitor, the small window as shown on the image below pops up, indicating that the serial monitor has been opened, but the actual serial monitor window doesn't appear when I click on it, nor is it anywhere to be seen when I search through my opened windows; it's practically not present anywhere. I have restarted my pc, but the problem persists. Can somebody help? Thanks in advance!
That rings a very faint bell with me, but I can't recall the exact circumstances. It had to do with using a second screen previously, where I had the monitor open. Then next time it wouldn't open if I didn't have a second screen. I had to attach a second screen again, open the monitor, pull it to the main screen, and after that it was ok when the second screen was plugged out.
Something like that anyway, sorry I can't be more precise.
The last screen on which I opened my serial monitor was a second screen in my office, but I am currently at home and have tried to connect my PC to my TV-screen and haven't found the serial monitor... I think I should connect it to my office screen. Thanks for your help
I have checked the "last.serial.location" and it showed me some position coordinates of my widescreen. Now I have changed the position values and lef the size values: "last.serial.location=0,0,1123,455", but the serial monitor still doesn't show up
I also have tried "last.serial.location=100,100,1123,455" but no results...
Unfortunately I don't have my widescreen with me at the moment to see if it pops up there.
I haven't checked those numbers in that preferences file, but I did just verify what I said earlier with my second screen.
If you have the monitor open on the second screen, and close the IDE, when you next open the IDE the second screen needs to be there when you open the monitor. Then you can drag it back to the main screen, and after that it works as normal.
Do you think the type of monitor it was last opened on matters? Because, like I said, I opened it on my widescreen the last time. When I now connect my pc to the TV-screen I can't find the serial monitor.
With the keyboard shortcut [Windows] + [Shift] + [→] [←] it should be possible to move windows between different screens. ( You must activate the window with [alt][tab] before - or by clicking on the small window ).
may be you could try moving the preference file out of the arduino directory (don't delete it, just move it out of the way) and with a little luck the IDE will recreate a default one.
The important thing to know when working with the preferences.txt file is that the Arduino IDE loads it from disk into memory on startup, then writes the memory contents back to the file on exit.
So this means two things:
Changes made to the file while the IDE is open (including deleting or moving it) will be reverted
The IDE will only recognize changes after you have restarted it.
The practical moral of the story here, to me, is simply to remember to close the monitor if it's open on a second screen, or drag it to the main screen, before closing the IDE. Then next time you run the IDE it will work.