Is it possible to create a pop-up notification with your custom text in Arduino IDE 2 while compiling, like this one?
That is built in, not custom.
Hi @karas1k. It might be possible to accomplish this by creating a custom Arduino IDE 2.x extension.
Unfortunately we don't have any formal documentation of the extension system, but it is the same as extensions for VS Code, and there is a lot of information available for creating VS Code extensions. You can start here:
The installation of extensions is a bit different in for Arduino IDE than for VS Code. The Arduino IDE extension installation instructions are provided here (themes are just a specific type of extension):
https://github.com/arduino/arduino-ide/blob/main/docs/advanced-usage.md#3rd-party-themes
Arduino IDE does make some Arduino-specific information available to extensions. I don't know whether that would be needed for your project, but in case it will, you can get some information by looking at the repository for the "VS Code Arduino API" extension (which is built-in to the Arduino IDE application) that provides this information, :
I'll list some Arduino IDE extensions that use that Arduino-specific information. You can use their codebases as a reference for understanding how to use the information in your own extensions:
- GitHub - dankeboy36/esp-exception-decoder: ESP8266/ESP32 Exception Decoder Extension for the Arduino IDE
- GitHub - earlephilhower/arduino-littlefs-upload: Build and uploads LittleFS filesystems for the Arduino-Pico RP2040, RP2350, ESP8266, and ESP32 cores under Arduino IDE 2.2.1 or higher
- GitHub - PaulStoffregen/secure_plugin_vscode
We might be able to offer a more simple alternative solution once we understand exactly what you are hoping to accomplish. Please add a reply here with a detailed description of what you want to display in the notification, and why you want to display that.
Actually, I need this for filming purposes, so it needs just to pop up once while or after compiling with a provided message
If it would be acceptable for the message to be shown in Arduino IDE's "Output" view instead of in the notification, you can add a #pragma message
directive to your sketch code.
For example, when you compile this sketch:
#pragma message "Hello, world!"
void setup() {}
void loop() {}
You will see something like this in the "Output" view:
C:\Users\per\Documents\Arduino\PragmaDemo\PragmaDemo.ino:1:17: note: #pragma message: Hello, world!
#pragma message "Hello, world!"
^~~~~~~~~~~~~~~
Sketch uses 662 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
If you want a message to appear in some sort of a GUI container, but don't need it to be in an Arduino IDE notification specifically, an alternative solution would be to add a "build hook" to the platform.txt
configuration file of the platform(s) of the boards you will be compiling for. The build hook would specify a command that Arduino IDE will invoke during the compilation process to display the message. This could either be a direct command that triggers the message display, or invoking a script or application that does it.
For example, if you add this line to the platform.txt
file of a platform on a Windows machine:
recipe.hooks.objcopy.postobjcopy.1.pattern.windows=python -c 'import ctypes; ctypes.windll.user32.MessageBoxW(0, "Hello, world!", "Dialog title", 1)'
then when you compile for any board of that platform you will see this dialog appear:
The Python code I used in this example happens to be specific to the Windows operating system, but if you are using a different operating system then you should have no problem accomplishing the same thing with some alternative code.
Make a fake HTML page. No compiler needed.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.