{"id":46,"date":"2026-10-13T15:54:15","date_gmt":"2026-10-13T15:54:15","guid":{"rendered":"https:\/\/rf-diy.com\/?p=46"},"modified":"2026-10-13T15:57:25","modified_gmt":"2026-10-13T15:57:25","slug":"utiliser-vscode-sur-raspberry-pi","status":"publish","type":"post","link":"https:\/\/rf-diy.com\/index.php\/2026\/10\/13\/utiliser-vscode-sur-raspberry-pi\/","title":{"rendered":"Utiliser VSCode sur Raspberry PI"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Ce guide complet et d\u00e9taill\u00e9, pas \u00e0 pas, est con\u00e7u pour vous accompagner dans la mise en place de votre projet entre Windows, VS Code et votre Raspberry Pi 3 (sous la derni\u00e8re version de Raspberry Pi OS, Bookworm, sans interface graphique).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Vue d&rsquo;ensemble du projet<\/h2>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>Connexion distante :<\/strong> Utiliser VS Code sur Windows pour coder directement sur le Raspberry Pi via le protocole SSH.<\/li>\n\n\n\n<li><strong>Le Mat\u00e9riel :<\/strong> Une LED externe branch\u00e9e sur une broche GPIO (par exemple la broche GPIO 17) et une r\u00e9sistance.<\/li>\n\n\n\n<li><strong>Le Logiciel :<\/strong> Un serveur web l\u00e9ger en Python (avec <strong>Flask<\/strong>) \u00e9coutant sur le port <strong>8888<\/strong> pour proposer une page web avec des boutons de vitesse.<\/li>\n\n\n\n<li><strong>L&rsquo;Automatisation :<\/strong> Un service syst\u00e8me (<code>systemd<\/code>) pour que l&rsquo;application d\u00e9marre toute seule d\u00e8s l&rsquo;allumage du Raspberry Pi.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"332\" src=\"https:\/\/rf-diy.com\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_uenvvwuenvvwuenv-1024x332.jpg\" alt=\"\" class=\"wp-image-47\" srcset=\"https:\/\/rf-diy.com\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_uenvvwuenvvwuenv-1024x332.jpg 1024w, https:\/\/rf-diy.com\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_uenvvwuenvvwuenv-300x97.jpg 300w, https:\/\/rf-diy.com\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_uenvvwuenvvwuenv-767x249.jpg 767w, https:\/\/rf-diy.com\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_uenvvwuenvvwuenv-1536x499.jpg 1536w, https:\/\/rf-diy.com\/wp-content\/uploads\/2026\/10\/Gemini_Generated_Image_uenvvwuenvvwuenv.jpg 1824w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u00c9tape 1 : Configuration initiale du Raspberry Pi (avec \u00e9cran\/clavier)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Puisque votre Raspberry Pi n&rsquo;a pas d&rsquo;interface graphique (OS \u00ab\u00a0Lite\u00a0\u00bb), branchez un \u00e9cran et un clavier pour la toute premi\u00e8re configuration :<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Au premier d\u00e9marrage, connectez-vous avec votre nom d&rsquo;utilisateur et votre mot de passe.<\/li>\n\n\n\n<li>Lancez l&rsquo;outil de configuration :<br>Bash<code>sudo raspi-config<\/code><\/li>\n\n\n\n<li><strong>Activez le SSH :<\/strong> Allez dans <code>Interface Options<\/code> -> <code>SSH<\/code> -> Activez-le (<code>Yes<\/code>).<\/li>\n\n\n\n<li><strong>Configurez le Wi-Fi (si n\u00e9cessaire) :<\/strong> Allez dans <code>System Options<\/code> -> <code>Wireless LAN<\/code> pour connecter votre Pi \u00e0 votre r\u00e9seau local.<\/li>\n\n\n\n<li><strong>R\u00e9cup\u00e9rez l&rsquo;adresse IP locale du Pi :<\/strong><br>Bash<code>hostname -I<\/code> <em>Notez cette adresse IP (par exemple <code>192.168.1.50<\/code>).<\/em> Vous pouvez aussi utiliser son nom d&rsquo;h\u00f4te par d\u00e9faut (<code>raspberrypi.local<\/code>).<\/li>\n\n\n\n<li>Vous pouvez maintenant d\u00e9brancher l&rsquo;\u00e9cran et le clavier, la suite se fera enti\u00e8rement depuis votre PC Windows !<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u00c9tape 2 : Connecter VS Code sous Windows au Raspberry Pi (Remote-SSH)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Pour coder sur le Pi comme s&rsquo;il \u00e9tait dans votre PC :<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Sur votre PC Windows, ouvrez <strong>VS Code<\/strong>.<\/li>\n\n\n\n<li>Allez dans l&rsquo;onglet des extensions (ic\u00f4ne de carr\u00e9s sur le c\u00f4t\u00e9 ou <code>Ctrl + Shift + X<\/code>), cherchez et installez <strong>Remote &#8211; SSH<\/strong> (de Microsoft).<\/li>\n\n\n\n<li>Ouvrez le terminal de VS Code (ou l&rsquo;invite de commande Windows) et g\u00e9n\u00e9rez une cl\u00e9 SSH (si ce n&rsquo;est pas d\u00e9j\u00e0 fait) :<br>Bash<code>ssh-keygen<\/code> <em>(Appuyez sur Entr\u00e9e \u00e0 chaque \u00e9tape pour valider les choix par d\u00e9faut).<\/em><\/li>\n\n\n\n<li>Copiez cette cl\u00e9 sur votre Raspberry Pi (remplacez <code>pi<\/code> par votre nom d&rsquo;utilisateur et l&rsquo;IP par celle de votre Pi) :<br>Bash<code>ssh-copy-id pi@192.168.1.50<\/code> Entrez votre mot de passe une derni\u00e8re fois. D\u00e9sormais, la connexion se fera sans mot de passe.<\/li>\n\n\n\n<li>Dans VS Code, appuyez sur <code>F1<\/code> (ou <code>Ctrl + Shift + P<\/code>), tapez et s\u00e9lectionnez : <strong><code>Remote-SSH: Connect to Host...<\/code><\/strong>.<\/li>\n\n\n\n<li>Entrez : <code>pi@192.168.1.50<\/code> (ou <code>pi@raspberrypi.local<\/code>).<\/li>\n\n\n\n<li>Une nouvelle fen\u00eatre VS Code s&rsquo;ouvre, connect\u00e9e au Raspberry Pi. Ouvrez un dossier (ex: <code>\/home\/pi\/projet_led<\/code>) pour commencer \u00e0 travailler.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u00c9tape 3 : Installer les biblioth\u00e8ques n\u00e9cessaires sur le Pi<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Sur le dernier Raspberry Pi OS (Bookworm), Python prot\u00e8ge son syst\u00e8me de paquets globaux. Le moyen le plus propre et recommand\u00e9 pour installer Flask et la gestion des GPIO est d&rsquo;utiliser les paquets officiels du syst\u00e8me (<code>apt<\/code>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Ouvrez le terminal int\u00e9gr\u00e9 dans VS Code (qui est connect\u00e9 au Pi) et tapez :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<div class=\"wp-block-code-syntax-highlighting-block-code-syntax-highlighting-block\"><template shadowrootmode=\"open\"><link rel=\"stylesheet\" href=\"\/wp-content\/plugins\/code-syntax-highlighting-block\/public\/css\/themes\/atom-one-dark.min.css?i=4237ffca7ce6aadb438c457e0a675b125c534bbdda5b87f41f3a1495603bcc9b\"\/><pre><code class=\"hljs\">sudo apt update\nsudo apt install -y python3-flask python3-gpiozero\n<\/code><\/pre><\/template><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>python3-flask<\/code> : Le mini-framework pour cr\u00e9er le serveur web.<\/li>\n\n\n\n<li><code>python3-gpiozero<\/code> : La biblioth\u00e8que moderne et ultra-simple pour piloter les GPIO en Python.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u00c9tape 4 : Cr\u00e9er le code du projet (Serveur Web + GPIO)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cr\u00e9ez l&rsquo;arborescence de fichiers suivante dans votre espace de travail VS Code :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Plaintext<\/p>\n\n\n\n<div class=\"wp-block-code-syntax-highlighting-block-code-syntax-highlighting-block\"><template shadowrootmode=\"open\"><link rel=\"stylesheet\" href=\"\/wp-content\/plugins\/code-syntax-highlighting-block\/public\/css\/themes\/atom-one-dark.min.css?i=4237ffca7ce6aadb438c457e0a675b125c534bbdda5b87f41f3a1495603bcc9b\"\/><pre><code class=\"hljs\">projet_led\/\n\u251c\u2500\u2500 app.py\n\u2514\u2500\u2500 templates\/\n    \u2514\u2500\u2500 index.html\n<\/code><\/pre><\/template><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">1. Le code HTML de la page web (<code>templates\/index.html<\/code>)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ce fichier contiendra les boutons permettant \u00e0 l&rsquo;utilisateur de choisir la vitesse de clignotement ou d&rsquo;\u00e9teindre la LED.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">HTML<\/p>\n\n\n\n<div class=\"wp-block-code-syntax-highlighting-block-code-syntax-highlighting-block\"><template shadowrootmode=\"open\"><link rel=\"stylesheet\" href=\"\/wp-content\/plugins\/code-syntax-highlighting-block\/public\/css\/themes\/atom-one-dark.min.css?i=4237ffca7ce6aadb438c457e0a675b125c534bbdda5b87f41f3a1495603bcc9b\"\/><pre><code class=\"hljs\">&lt;!DOCTYPE html&gt;\n&lt;html lang=<span class=\"hljs-string\">&quot;fr&quot;<\/span>&gt;\n&lt;head&gt;\n    &lt;meta charset=<span class=\"hljs-string\">&quot;UTF-8&quot;<\/span>&gt;\n    &lt;title&gt;Contr\u00f4le LED Raspberry Pi&lt;\/title&gt;\n    &lt;style&gt;\n        body { font-family: Arial, sans-serif; text-align: center; margin-top: <span class=\"hljs-number\">50<\/span>px; background-color: <span class=\"hljs-comment\">#f4f4f9; }<\/span>\n        h1 { color: <span class=\"hljs-comment\">#333; }<\/span>\n        .btn { padding: <span class=\"hljs-number\">15<\/span>px <span class=\"hljs-number\">30<\/span>px; font-size: <span class=\"hljs-number\">18<\/span>px; margin: <span class=\"hljs-number\">10<\/span>px; cursor: pointer; border: none; border-radius: <span class=\"hljs-number\">5<\/span>px; color: white; }\n        .btn-slow { background-color: <span class=\"hljs-comment\">#3498db; }<\/span>\n        .btn-med { background-color: <span class=\"hljs-comment\">#f1c40f; color: black; }<\/span>\n        .btn-fast { background-color: <span class=\"hljs-comment\">#e74c3c; }<\/span>\n        .btn-off { background-color: <span class=\"hljs-comment\">#2c3e50; }<\/span>\n    &lt;\/style&gt;\n&lt;\/head&gt;\n&lt;body&gt;\n    &lt;h1&gt;Contr\u00f4le de la <span class=\"hljs-title function_ invoke__\">LED<\/span> (Port <span class=\"hljs-number\">8888<\/span>)&lt;\/h1&gt;\n    &lt;p&gt;Choisissez la vitesse de clignotement de la LED :&lt;\/p&gt;\n    \n    &lt;br&gt;\n    &lt;a href=<span class=\"hljs-string\">&quot;\/set\/slow&quot;<\/span>&gt;&lt;button <span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span>=&quot;<span class=\"hljs-title\">btn<\/span> <span class=\"hljs-title\">btn<\/span>-<span class=\"hljs-title\">slow<\/span>&quot;&gt;<span class=\"hljs-title\">Lent<\/span> (1 <span class=\"hljs-title\">sec<\/span>)&lt;\/<span class=\"hljs-title\">button<\/span>&gt;&lt;\/<span class=\"hljs-title\">a<\/span>&gt;\n    &lt;<span class=\"hljs-title\">a<\/span> <span class=\"hljs-title\">href<\/span>=&quot;\/<span class=\"hljs-title\">set<\/span>\/<span class=\"hljs-title\">medium<\/span>&quot;&gt;&lt;<span class=\"hljs-title\">button<\/span> <span class=\"hljs-title\">class<\/span>=&quot;<span class=\"hljs-title\">btn<\/span> <span class=\"hljs-title\">btn<\/span>-<span class=\"hljs-title\">med<\/span>&quot;&gt;<span class=\"hljs-title\">Moyen<\/span> (0.5 <span class=\"hljs-title\">sec<\/span>)&lt;\/<span class=\"hljs-title\">button<\/span>&gt;&lt;\/<span class=\"hljs-title\">a<\/span>&gt;\n    &lt;<span class=\"hljs-title\">a<\/span> <span class=\"hljs-title\">href<\/span>=&quot;\/<span class=\"hljs-title\">set<\/span>\/<span class=\"hljs-title\">fast<\/span>&quot;&gt;&lt;<span class=\"hljs-title\">button<\/span> <span class=\"hljs-title\">class<\/span>=&quot;<span class=\"hljs-title\">btn<\/span> <span class=\"hljs-title\">btn<\/span>-<span class=\"hljs-title\">fast<\/span>&quot;&gt;<span class=\"hljs-title\">Rapide<\/span> (0.1 <span class=\"hljs-title\">sec<\/span>)&lt;\/<span class=\"hljs-title\">button<\/span>&gt;&lt;\/<span class=\"hljs-title\">a<\/span>&gt;\n    &lt;<span class=\"hljs-title\">a<\/span> <span class=\"hljs-title\">href<\/span>=&quot;\/<span class=\"hljs-title\">set<\/span>\/<span class=\"hljs-title\">off<\/span>&quot;&gt;&lt;<span class=\"hljs-title\">button<\/span> <span class=\"hljs-title\">class<\/span>=&quot;<span class=\"hljs-title\">btn<\/span> <span class=\"hljs-title\">btn<\/span>-<span class=\"hljs-title\">off<\/span>&quot;&gt;\u00c9<span class=\"hljs-title\">teindre<\/span>&lt;\/<span class=\"hljs-title\">button<\/span>&gt;&lt;\/<span class=\"hljs-title\">a<\/span>&gt;\n&lt;\/<span class=\"hljs-title\">body<\/span>&gt;\n&lt;\/<span class=\"hljs-title\">html<\/span>&gt;\n<\/span><\/code><\/pre><\/template><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">2. Le code Python du serveur (<code>app.py<\/code>)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ce script g\u00e8re les requ\u00eates web et fait clignoter la LED en arri\u00e8re-plan \u00e0 l&rsquo;aide de threads pour ne pas bloquer le serveur web.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Python<\/p>\n\n\n\n<div class=\"wp-block-code-syntax-highlighting-block-code-syntax-highlighting-block\"><template shadowrootmode=\"open\"><link rel=\"stylesheet\" href=\"\/wp-content\/plugins\/code-syntax-highlighting-block\/public\/css\/themes\/atom-one-dark.min.css?i=4237ffca7ce6aadb438c457e0a675b125c534bbdda5b87f41f3a1495603bcc9b\"\/><pre><code class=\"hljs\">import threading\nimport time\n<span class=\"hljs-keyword\">from<\/span> flask import Flask, render_template\n<span class=\"hljs-keyword\">from<\/span> gpiozero import LED\n\napp = <span class=\"hljs-title function_ invoke__\">Flask<\/span>(__name__)\n\n<span class=\"hljs-comment\"># Initialisation de la LED sur la broche GPIO 17 (BCM)<\/span>\n<span class=\"hljs-comment\"># Adaptez le num\u00e9ro selon votre c\u00e2blage physique<\/span>\nled = <span class=\"hljs-title function_ invoke__\">LED<\/span>(<span class=\"hljs-number\">17<\/span>)\n\n<span class=\"hljs-comment\"># Variable globale pour stocker la vitesse (intervalle de clignotement)<\/span>\n<span class=\"hljs-comment\"># None = \u00e9teint\/statique<\/span>\nblink_speed = None\nrunning = True\n\ndef <span class=\"hljs-title function_ invoke__\">blink_worker<\/span>():\n    <span class=\"hljs-string\">&quot;&quot;<\/span><span class=\"hljs-string\">&quot;Fonction qui fait clignoter la LED en arri\u00e8re-plan&quot;<\/span><span class=\"hljs-string\">&quot;&quot;<\/span>\n    <span class=\"hljs-keyword\">global<\/span> blink_speed\n    <span class=\"hljs-keyword\">while<\/span> running:\n        <span class=\"hljs-keyword\">if<\/span> blink_speed is not None:\n            led.<span class=\"hljs-title function_ invoke__\">on<\/span>()\n            time.<span class=\"hljs-title function_ invoke__\">sleep<\/span>(blink_speed)\n            led.<span class=\"hljs-title function_ invoke__\">off<\/span>()\n            time.<span class=\"hljs-title function_ invoke__\">sleep<\/span>(blink_speed)\n        <span class=\"hljs-keyword\">else<\/span>:\n            led.<span class=\"hljs-title function_ invoke__\">off<\/span>()\n            time.<span class=\"hljs-title function_ invoke__\">sleep<\/span>(<span class=\"hljs-number\">0.1<\/span>)\n\n<span class=\"hljs-comment\"># Lancement du thread de clignotement<\/span>\nt = threading.<span class=\"hljs-title function_ invoke__\">Thread<\/span>(target=blink_worker, daemon=True)\nt.<span class=\"hljs-title function_ invoke__\">start<\/span>()\n\n@app.<span class=\"hljs-title function_ invoke__\">route<\/span>(<span class=\"hljs-string\">&#x27;\/&#x27;<\/span>)\ndef <span class=\"hljs-title function_ invoke__\">index<\/span>():\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-title function_ invoke__\">render_template<\/span>(<span class=\"hljs-string\">&#x27;index.html&#x27;<\/span>)\n\n@app.<span class=\"hljs-title function_ invoke__\">route<\/span>(<span class=\"hljs-string\">&#x27;\/set\/&lt;speed&gt;&#x27;<\/span>)\ndef <span class=\"hljs-title function_ invoke__\">set_speed<\/span>(speed):\n    <span class=\"hljs-keyword\">global<\/span> blink_speed\n    <span class=\"hljs-keyword\">if<\/span> speed == <span class=\"hljs-string\">&#x27;slow&#x27;<\/span>:\n        blink_speed = <span class=\"hljs-number\">1.0<\/span>\n    elif speed == <span class=\"hljs-string\">&#x27;medium&#x27;<\/span>:\n        blink_speed = <span class=\"hljs-number\">0.5<\/span>\n    elif speed == <span class=\"hljs-string\">&#x27;fast&#x27;<\/span>:\n        blink_speed = <span class=\"hljs-number\">0.1<\/span>\n    elif speed == <span class=\"hljs-string\">&#x27;off&#x27;<\/span>:\n        blink_speed = None\n        led.<span class=\"hljs-title function_ invoke__\">off<\/span>()\n    <span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-title function_ invoke__\">render_template<\/span>(<span class=\"hljs-string\">&#x27;index.html&#x27;<\/span>)\n\n<span class=\"hljs-keyword\">if<\/span> __name__ == <span class=\"hljs-string\">&#x27;__main__&#x27;<\/span>:\n    <span class=\"hljs-comment\"># Lancement du serveur sur le port 8888, accessible depuis n&#x27;importe quelle IP du r\u00e9seau<\/span>\n    app.<span class=\"hljs-title function_ invoke__\">run<\/span>(host=<span class=\"hljs-string\">&#x27;0.0.0.0&#x27;<\/span>, port=<span class=\"hljs-number\">8888<\/span>)\n<\/code><\/pre><\/template><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">3. Testez votre application manuellement<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Dans le terminal de VS Code, lancez votre script :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<div class=\"wp-block-code-syntax-highlighting-block-code-syntax-highlighting-block\"><template shadowrootmode=\"open\"><link rel=\"stylesheet\" href=\"\/wp-content\/plugins\/code-syntax-highlighting-block\/public\/css\/themes\/atom-one-dark.min.css?i=4237ffca7ce6aadb438c457e0a675b125c534bbdda5b87f41f3a1495603bcc9b\"\/><pre><code class=\"hljs\">python3 app.py\n<\/code><\/pre><\/template><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Ouvrez un navigateur web sur votre PC Windows et rendez-vous \u00e0 l&rsquo;adresse :<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>[http:\/\/192.168.1.50:8888](http:\/\/192.168.1.50:8888)<\/code> (remplacez par l&rsquo;IP de votre Pi). Vous devriez voir la page web et pouvoir contr\u00f4ler votre LED externe en direct !<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u00c9tape 5 : Automatiser le d\u00e9marrage au boot (Service Systemd)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Pour que votre script se lance tout seul d\u00e8s que le Raspberry Pi s&rsquo;allume, nous allons cr\u00e9er un service syst\u00e8me.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Cr\u00e9ez un fichier de service systemd avec les privil\u00e8ges administrateur :<br>Bash<code>sudo nano \/etc\/systemd\/system\/webled.service<\/code><\/li>\n\n\n\n<li>Collez la configuration suivante (adaptez le chemin <code>\/home\/pi\/projet_led\/app.py<\/code> si votre dossier a un autre nom) :<br>Ini, TOML<code>[Unit] Description=Serveur Web Flask Controle LED GPIO After=network.target [Service] User=pi WorkingDirectory=\/home\/pi\/projet_led ExecStart=\/usr\/bin\/python3 \/home\/pi\/projet_led\/app.py Restart=always [Install] WantedBy=multi-user.target<\/code><\/li>\n\n\n\n<li>Sauvegardez et quittez (<code>Ctrl + O<\/code>, puis <code>Entr\u00e9e<\/code>, puis <code>Ctrl + X<\/code> sous Nano).<\/li>\n\n\n\n<li>Informez le syst\u00e8me de l&rsquo;existence de ce nouveau service, activez-le et d\u00e9marrez-le :<br>Bash<code>sudo systemctl daemon-reload sudo systemctl enable webled.service sudo systemctl start webled.service<\/code><\/li>\n\n\n\n<li>V\u00e9rifiez que tout fonctionne bien :<br>Bash<code>sudo systemctl status webled.service<\/code> Si le statut indique <code>active (running)<\/code>, f\u00e9licitations ! Votre application tourne en arri\u00e8re-plan et red\u00e9marrera automatiquement m\u00eame apr\u00e8s une coupure de courant.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Ce guide complet et d\u00e9taill\u00e9, pas \u00e0 pas, est con\u00e7u pour vous accompagner dans la mise en place de votre projet entre Windows, VS Code et votre Raspberry Pi 3 (sous la derni\u00e8re version de Raspberry Pi OS, Bookworm, sans interface graphique). Vue d&rsquo;ensemble du projet \u00c9tape 1 : Configuration initiale du Raspberry Pi (avec [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-46","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/posts\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":4,"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/posts\/46\/revisions"}],"predecessor-version":[{"id":51,"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/posts\/46\/revisions\/51"}],"wp:attachment":[{"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/media?parent=46"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/categories?post=46"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rf-diy.com\/index.php\/wp-json\/wp\/v2\/tags?post=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}