esphome-docs/api/core/wifi.rst

38 lines
720 B
ReStructuredText
Raw Normal View History

2018-05-13 11:37:02 +02:00
WiFi
====
Example Usage
-------------
.. code-block:: cpp
// Basic
App.init_wifi("YOUR_SSID", "YOUR_PASSWORD");
// Manual IP
auto *wifi = App.init_wifi("YOUR_SSID", "YOUR_PASSWORD");
wifi->set_sta_manual_ip(ManualIP{
.static_ip = IPAddress(192, 168, 178, 42),
.gateway = IPAddress(192, 168, 178, 1),
.subnet = IPAddress(255, 255, 255, 0)
});
// AP
wifi->set_ap("AP SSID", "Optional AP Password");
API Reference
-------------
.. cpp:namespace:: nullptr
WiFiComponent
*************
.. doxygenclass:: WiFiComponent
:members:
:protected-members:
:undoc-members:
.. doxygenstruct:: ManualIP
:members:
:protected-members:
:undoc-members: