🛠 Connecter la Yún au WiFi et piloter une broche depuis le navigateur

Arduino Yún · debutant · Schéma : IMG-yun-debutant-2-yun-config-wifi-arduino-local.svg — Yún avec ant WiFi, câble Ethernet et flèche vers un navigateur affichant http://arduino.local, panneau de configuration WiFi ; une LED sur la pin 13 reliée à un bouton du tableau de bord web.

Objectives

Leverage the Yún's networking capabilities: connect to its "Arduino Yun" WiFi access point (restore mode), access the built-in configuration page, join your home network, and control a digital pin directly via a URL — without writing a single line of code, thanks to the REST API embedded in Linino OS.

Hardware

Complete Procedure

  1. Power on the Yún. For approximately 20 seconds during startup, it broadcasts an open WiFi network named Arduino Yun (restore mode). Connect to it (password: WiFi is open on first boot, then protected by the default admin password "yun" — depending on the Linino OS version).
  2. Open http://arduino.local (or the IP address displayed on the captive portal page). The configuration panel asks for the root password (default: yun).
  3. In the WiFi configuration tab: select your network, enter the key, and confirm. The board restarts and joins your access point.
  4. Test the REST API directly in your browser (pin 13 set as output):
# Mettre la pin 13 en sortie, niveau HIGH :
http://arduino.local/arduino/digital/13/1

# Niveau LOW :
http://arduino.local/arduino/digital/13/0

# Lecture d'une broche numérique (réponse texte) :
http://arduino.local/arduino/digital/7

These routes work WITHOUT a specific sketch on the 32U4: the Bridge service on the Linux side drives the pins directly, provided that a sketch with Bridge.begin (or the BridgeYunServer example sketch) keeps the bridge alive. This is the quickest way to verify that the 32U4 ↔ AR9331 duo is communicating (they talk via the internal serial port, pins 0/1 of the 32U4).

Expected Verification

http://arduino.local responds → Linux is online and reachable. The command /arduino/digital/13/1 turns the LED on instantly; /13/0 turns it off. From a terminal: curl http://arduino.local/arduino/digital/13/1 does the same thing. If arduino.local does not respond (mDNS resolution can be flaky on Windows), use the IP address displayed on the configuration page.

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials