L'interface IDE (Integrated Development Interface)
possède ne nombreux paramètres de configuration, qui sont cachés.
Pour accéder à ces paramètres cachés, taper : Ctrl+Shift+P .. preferences .. Open Settings (UI)
On peut aussi voir le fichiers des paramètres (settings) avec : Ctrl+Shift+P .. preferences .. Open Settings (JSON)
Sous Linux, il se trouve sous : $HOME/.arduinoIDE/settings.json
En principe, on ne modifie pas directement ce fichier.
Voici la descriptions de certains paramètres de l'IDE :
>> J'ai mis deux flèches >> devant les paramètres qui m'intéressent plus particulièrement.
>> Editor: Auto Closing Brackets :
Permet de définir si les parenthèses et accolades se ferment automatiquement.
Personnellement, je n'aime pas la fermeture automatique des parenthèses. Auto Closing Quotes existe aussi pour les guillemets.
>> Editor: Cursor Surrounding Lines #nombre :
permet de toujours voir un certain #nombre de lignes en-bas et en-haut.
Editor: Fast Scroll Sensitivity :
En pressant sur la touche ALT, on peut augmenter la vitesse de défilement lors de l'utilisation de la molette de la souris.
>> Editor: Folding > Show Folding Controls > always :
permet de cacher/montrer une suite de ligne de code.
Je mets : "Folding Strategy > auto".
Il faut indenter la suite de lignes que l'on veut cacher. Folding à voir aussi. Folding Strategy > auto à voir aussi.
Editor: Insert Spaces :
Insertion d'espaces lorsque l'on presse sur la touche de Tabulation.
Editor: Line Numbers :
Décide si on désire afficher les numéros de lignes à gauche. Pour moi c'est OUI
Editor: Match Brackets :
Décide si on indique la parenthèse correspondante. Pour moi, c'est OUI
Editor: Mouse Wheel Scroll Sensitivity :
Permet de faire défiler les lignes plus rapidement avec la molette de souris.
Editor: Mouse Wheel Zoom :
Permet de zoomer le texte avec CTRL + molett de souris.
Editor: Multi Cursor Modifier :
Avec la touche ALT, on peut faire apparaître plusieurs curseurs et faire des sélections multiples.
Je n'ai jamais utilsé cette fonctionnalité.
Editor: Tab Size :
Définit la taille de l'indentation. Je la mets à 2.
Editor: Word Wrap :
Permet de forcer un retour à la ligne des lignes trop longues.
Personnellement, j'évite les lignes trop longues, donc je n'utilisa pas ce paramètre.
Editor: Word Wrap Column est aussi disponible.
Files: Encoding :
Définit l'encodage des caractères. Sous Linux et Max, UTF8 est la norme.
Editor > Scrollbar: Vertical Scrollbar Size :
Permet de changer la largeur de la barre de défilement à droite de la fenêtre.
L'équivalent existe pour la barre horizontale
Editor > Sticky Scroll :
Pas utile pour moi.
Si on a une suite d'indentations, affiche en haut de la fenêtre la première ligne de chaque indentation
lorsque l'on défile vers le bas.
C.f. :
"What is Sticky Scroll for Visual Studio?"
>> Editor > Hover: Enabled ; Delay et Sticky:
Active / désactive l'affichage d'information sur les variables.
Change le temps avant l'apparition de l’info.
Indique si le déplacement de la souris sur l'information la cache ou la maintient.
Editor > Minimap: Autohide ; Enable ; etc. :
permet d'avoir en petit sur la droite une vue d'ensemble du document.
>> Editor > History: Persist Closed Editors :
Demande au démarrage d'ouvrir tous les fichiers qui étaient ouverts lorsqu'on a quitté l'IDE.
Arduino >Compile: Verbose :
Permet d'afficher plus d'information dans la fenêtre "Output" lors de la compilation.
Arduino >Upload: Verbose existe aussi.
J'ai cherché longtemps et demandé à deux intelligences artificielles comment augmenter le nombre de
"fichiers récents" (File > Open Recent >)
Il semble que ce n'est pas possible actuellement, dans la version 2.3.4
On peut voir la liste des fichiers récents dans :
$HOME/.arduinoIDE/recent-sketches.json
Il existe aussi le fichier (Je ne sais pas à quoi il sert.) :
$HOME/.arduinoIDE/recentworkspace.json
L'intelligence artificielle "Claude 3" de Antropique m'a donné une liste de paramètres de l'IDE d'Arduino suite à ma demande :
"Do you know all the settings which can be used in the file settings.json of the Arduino IDE ?"
Voici sa réponse :
The settings.json file in the Arduino IDE (specifically, Arduino IDE 2.x, which is based on the Electron framework
and uses a JSON-based configuration system) allows you to customize various aspects of the IDE's behavior.
While the exact settings available may depend on the version of the Arduino IDE you're using,
I can provide you with a comprehensive list of commonly used settings.
These settings are typically found in the settings.json file located at:
• Windows: %APPDATA%\Arduino IDE\settings.json
• macOS: ~/Library/Application Support/arduino-ide/settings.json
• Linux: ~/.config/arduino-ide/settings.json
Here’s a list of commonly used settings in the settings.json file for Arduino IDE 2.x:
General Settings {
"arduino.language": "en", // Language for the IDE (e.g., "en", "fr", "es")
"window.zoomLevel": 0, // Adjust the zoom level of the IDE (default is 0)
"files.autoSave": "afterDelay", // Auto-save files (options: "off", "afterDelay", "onFocusChange", "onWindowChange")
"files.autoSaveDelay": 1000, // Delay in milliseconds before auto-saving (default is 1000ms)
"editor.fontSize": 14, // Font size for the code editor (default is 14)
"editor.fontFamily": "monospace", // Font family for the code editor (default is "monospace")
"editor.tabSize": 2, // Number of spaces per tab (default is 2)
"editor.insertSpaces": true, // Use spaces instead of tabs (default is true)
"editor.lineNumbers": "on", // Show line numbers (options: "on", "off", "relative")
"editor.minimap.enabled": true, // Enable the minimap (default is true)
"editor.wordWrap": "off", // Word wrapping (options: "off", "on", "wordWrapColumn", "bounded")
"editor.renderWhitespace": "none", // Render whitespace characters (options: "none", "boundary", "all")
"editor.rulers": [80, 120], // Show vertical rulers at specified column(s)
"editor.formatOnSave": false, // Format code automatically when saving (default is false)
"editor.formatOnPaste": false, // Format code automatically when pasting (default is false)
"editor.suggestOnTriggerCharacters": true, // Enable auto-suggestions (default is true)
"editor.quickSuggestions": {
"other": true,
"comments": false,
"strings": false
}, // Control when suggestions are shown
"explorer.autoReveal": true, // Automatically reveal files in the file explorer (default is true)
"workbench.colorTheme": "Default Dark+", // Theme for the IDE (default is "Default Dark+")
"workbench.iconTheme": "vs-seti", // Icon theme for the file explorer (default is "vs-seti")
"workbench.startupEditor": "welcomePage", // Startup behavior (options: "welcomePage", "newUntitledFile", "none")
"workbench.activityBar.visible": true, // Show the activity bar (default is true)
"workbench.statusBar.visible": true, // Show the status bar (default is true)
"workbench.sideBar.location": "left", // Location of the side bar (options: "left", "right")
"telemetry.telemetryLevel": "all", // Telemetry level (options: "all", "error", "off")
"update.mode": "default", // Update mode (options: "default", "none", "manual")
"update.showReleaseNotes": true, // Show release notes after updates (default is true)
"extensions.autoUpdate": true, // Automatically update extensions (default is true)
"extensions.autoCheckUpdates": true, // Automatically check for extension updates (default is true)
"extensions.ignoreRecommendations": false, // Ignore extension recommendations (default is false)
"terminal.integrated.fontSize": 14, // Font size for the integrated terminal (default is 14)
"terminal.integrated.fontFamily": "monospace", // Font family for the integrated terminal (default is "monospace")
"terminal.integrated.cursorStyle": "line", // Cursor style in the terminal (options: "line", "block", "underline")
"terminal.integrated.cursorBlinking": false, // Enable blinking cursor in the terminal (default is false)
"terminal.integrated.shell.linux": "/bin/bash", // Default shell for Linux
"terminal.integrated.shell.osx": "/bin/bash", // Default shell for macOS
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe", // Default shell for Windows
"terminal.integrated.windowsEnableConpty": true, // Enable ConPTY for Windows (default is true)
"terminal.integrated.scrollback": 1000, // Number of lines to keep in the terminal scrollback buffer (default is 1000)
"git.enabled": true, // Enable Git integration (default is true)
"git.autofetch": true, // Automatically fetch Git repositories (default is true)
"git.confirmSync": true, // Confirm before syncing Git repositories (default is true)
"git.ignoreLegacyWarning": true, // Ignore legacy Git warning (default is true)
"search.useIgnoreFiles": true, // Use .gitignore and .ignore files during search (default is true)
"search.exclude": {
"**/node_modules": true,
"**/bower_components": true
}, // Exclude patterns for search
"http.proxy": "", // Proxy URL for HTTP requests
"http.proxyStrictSSL": true, // Use strict SSL for proxy connections (default is true)
"security.workspace.trust.enabled": true, // Enable workspace trust security feature (default is true)
"security.workspace.trust.startupPrompt": "always", // Show workspace trust prompt on startup (options: "always", "once", "never")
"security.workspace.trust.emptyWindow": false, // Trust empty windows by default (default is false)
"arduino.path": "", // Path to Arduino CLI (if not using the default)
"arduino.logLevel": "info", // Log level for Arduino CLI (options: "info", "debug", "warn", "error")
"arduino.enableTesting": false, // Enable testing features (default is false)
"arduino.enableMI": false, // Enable machine interface (default is false)
"arduino.disableTesting": false, // Disable testing features (default is false)
"arduino.additionalUrls": [], // Additional board manager URLs (array of strings)
"arduino.defaultFqbn": "", // Default Fully Qualified Board Name (FQBN)
"arduino.sketch.savePath": "", // Default save path for sketches
"arduino.sketch.alwaysShowOutput": false, // Always show output panel when compiling (default is false)
"arduino.sketch.autoCreate": true, // Automatically create a new sketch when opening the IDE (default is true)
"arduino.compile.verbose": false, // Enable verbose output during compilation (default is false)
"arduino.upload.verbose": false, // Enable verbose output during upload (default is false)
"arduino.monitor.baudRate": 9600, // Default baud rate for serial monitor (default is 9600)
"arduino.monitor.lineEnding": "LF", // Default line ending for serial monitor (options: "LF", "CR", "CRLF")
"arduino.monitor.showTimestamps": false, // Show timestamps in serial monitor (default is false)
"arduino.monitor.autoscroll": true, // Enable autoscroll in serial monitor (default is true)
"arduino.monitor.clearOutputOnConnect": true, // Clear serial monitor output when connecting (default is true)
"arduino.monitor.echo": false, // Echo typed characters in serial monitor (default is false)
"arduino.monitor.hexadecimal": false, // Display data in hexadecimal format in serial monitor (default is false)
"arduino.monitor.localEcho": false, // Enable local echo in serial monitor (default is false)
"arduino.monitor.newline": true, // Send newline character when pressing Enter in serial monitor (default is true)
"arduino.monitor.timestampFormat": "HH:mm:ss.SSS", // Timestamp format for serial monitor (default is "HH:mm:ss.SSS")
"arduino.monitor.timestampColor": "#888888", // Color for timestamps in serial monitor (default is "#888888")
"arduino.monitor.dataColor": "#000000", // Color for data in serial monitor (default is "#000000")
"arduino.monitor.errorColor": "#FF0000", // Color for errors in serial monitor (default is "#FF0000")
"arduino.monitor.warningColor": "#FFA500", // Color for warnings in serial monitor (default is "#FFA500")
"arduino.monitor.infoColor": "#0000FF", // Color for info messages in serial monitor (default is "#0000FF")
Liste des Symboles utilisables par le préprocesseur, avec #define :
Symboles utilisables par le préprocesseur, avec #define :
Il faut ajouté : ARDUINO_ devant les noms ci-dessous :
AVR_ADK
AVR_BT
AVR_CIRCUITPLAY
AVR_DUEMILANOVE
AVR_ESPLORA
AVR_ETHERNET
AVR_FIO
AVR_GEMMA
AVR_INDUSTRIAL101
AVR_LEONARDO
AVR_LEONARDO_ETH
AVR_LILYPAD
AVR_LILYPAD_USB
AVR_LININO_ONE
AVR_MEGA
AVR_MEGA2560
AVR_MICRO
AVR_MINI
AVR_NANO
AVR_NG
AVR_PRO
AVR_ROBOT_CONTROL
AVR_ROBOT_MOTOR
AVR_UNO
AVR_UNO_WIFI_DEV_ED
AVR_YUN
AVR_YUNMINI
C.f. : $HOME/Bg2/Arduino/ArduinoCore-avr-master/boards.txt
Liste obtenue par :
cd $HOME/Bg2/Arduino/ArduinoCore-avr-master
grep board= boards.txt | cut -f2 -d= | sort -u
Exemple :
#if defined ARDUINO_AVR_UNO
#pragma message ( "Compilation pour un Arduino UNO" )
if (bUp) bitSet( PORTD, 3); // digitalWrite(3, HIGH); // Signal carré
else bitClear(PORTD, 3); // digitalWrite(, LOW);
#elif defined ARDUINO_AVR_MEGA2560
if (bUp) bitSet( PORTE, 5); // digitalWrite(3, HIGH); // Signal carré
else bitClear(PORTE, 5); // digitalWrite(3, LOW);
//#warning "Compilation pour un Arduino MEGA2560"
#pragma message ( "Compilation pour un Arduino MEGA2560" )
#endif