![Arduino Yun Скачать руководство пользователя страница 5](http://html1.mh-extra.com/html/arduino/yun/yun_manual_2966336005.webp)
A nice introduction to the concepts behind REST
can be found here
.
The there are two REST end points recognized by the Yún are:
/arduino
/data
The "/arduino" directory doesn't have anything pre-configured. Anything added to the URL after
the end point is passed from the webserver to the sketch on the 32U4. You can define your APIs
inside the sketch. See the Bridge example to see how this is done to access the pins on the board.
"/data" is used to access to the internal key/value storage. The available calls are:
/put/KEY/VALUE
: stores a value inside the storage
/get/KEY
: obtains the value of the requested key in JSON
/get
: obtains the entire storage list in JSON.
/delete
: deletes the internal storage
Resetting the processors (AR9331, WiFi, and 32U4)
To restart the AR9331, which reboots Linino, press the "YÚN RST" reset button that is close to
the analog inputs pins and the LEDs of the board.
To restart the the 32U4 and restart the currently installed Arduino sketch, tap the button next to
the Ethernet port
two times
.
The reset button for WiFi is located next to the USB-A connector. When you press the button,
the WLAN LED will flash.
If you move to a different network and can no longer wirelessly access the Yún through its web
interface, you can reset the Yún's network configuration by pressing the Wifi reset button for
longer longer than 5 seconds, but less than 30, the AR9331 processor will reboot. The WiFi
configuration will be reset and the Yún will start its own wiFi network Arduino Yún-
XXXXXXXXXXXX. Any other modification/configuration will be retained.
To reset the Linino distribution to its default state, press the WiFi reset button for at least 30
seconds. The board reverts to the original settings as if it had been reflashed or taken out of the
box. Among other things, this removes all installed files and network settings.
Serial re-enumeration on reset.
Since the Yún does not have a dedicated chip to handle serial communication, it means that the
serial port is
virtual
-- it's a software routine, both on your operating system, and on the board
itself. Just as your computer creates an instance of the serial port driver when you plug in any
Arduino, the 32u4 creates a serial instance whenever it runs its bootloader. The board is an
instance of USB's
Connected Device Class (CDC)
driver.
This means that every time you reset the 32U4 processor, the USB serial connection will be
broken and re-established. The board will disappear from the list of serial ports, and the list will
re-enumerate. Any program that has an open serial connection to the Yún will lose its
connection. This is in contrast to the Arduino Uno, with which you can reset the main processor
(the ATmega328P) without closing the USB connection (which is maintained by the secondary