Skip to main content

XIAO W5500 イーサネットアダプターの使用開始

はじめに

XIAO ESP32S3 Plusを搭載したコンパクトなPoE開発ボードで、統合された絶縁PoEモジュールとTPS563201ベースの電源変換により、マイクロコントローラーに電力を供給するクリーンな5V電源を提供します。IoTプロジェクト、スマートホームデバイス、産業オートメーションに最適で、信頼性の高いイーサネット接続と低消費電力ワイヤレス処理の多用途な組み合わせにより、設置を簡素化し、システム性能を向上させます。

特徴

  • 高性能マイクロコントローラー: XIAO ESP32S3 Plusプラットフォーム上に構築された当ボードは、堅牢な処理能力と効率的なワイヤレス接続を提供し、複雑なIoTおよび組み込みアプリケーションに最適です。

  • 絶縁・電源変換機能付き統合PoE: 内蔵絶縁機能を備えた堅牢なPoEモジュールを搭載し、12Vイーサネット電源入力を安全に受け入れます。高効率TPS563201降圧コンバーターが12Vを安定した5Vレールに降圧し、XIAO ESP32S3 Plusに最適な電力を提供します。

  • 信頼性の高いイーサネット接続: オンボードW5500イーサネットチップと標準RJ45ジャックを搭載し、シームレスなデータ伝送とリモート管理のための安定した有線ネットワークアクセスを確保します。

  • 多用途I/Oオプション: 両面I/O出力により、機能を簡単に拡張し、さまざまなセンサーや周辺機器とインターフェースして、アプリケーションを正確な仕様にカスタマイズできます。

  • コンパクト・即座展開可能設計: 統合PoE、絶縁回路、イーサネット接続を小型フォームファクターに組み合わせ、このボードはプロトタイピングを簡素化し、スマートホーム、産業オートメーション、またはネットワーク機器プロジェクトでの効率的な展開を可能にします。

仕様

パラメータ説明
MCUXIAO ESP32-S3 Plus
アンテナ2.4GHzロッドアンテナ (2.81dBi)
USB Type-C入力電圧 (Type-C): 5V
PoEチップMQ7813T120
PoE電源PoE IEEE802.3af
出力電流: 12V/1.1A
高効率86% (入力48V、負荷[email protected])
イーサネットチップWIZnet W5500
イーサネットインターフェースRJ45
10または100Mbpsイーサネット
TCP/IPプロトコルTCP, UDP, ICMP, IPv4, ARP, IGMP, PPPoE
LEDインジケーター電源 x 1
ユーザー x 1
ボタンリセット
I/Oインターフェース
製品サイズ83 x 118 x 26 mm
製品重量75g
筐体ホワイト3Dプリント

ハードウェア概要

以下の画像は、XIAO W5500 Ethernet Adapterの外観デザインを示しています。コンパクトなフォームファクター、Ethernetポート、およびXIAOシリーズマイクロコントローラーとの接続用インターフェースを確認できます。この設計により、スペースと信頼性が重要な様々なプロジェクトに簡単に統合できます。

はじめに

配線手順

XIAO W5500 Ethernet Adapterをネットワークに接続する推奨方法は2つあります:

  1. PoE対応スイッチまたはルーターの使用:
    • 標準のRJ45 Ethernetケーブルを使用して、デバイスをPoE対応スイッチまたはルーターに直接接続します。この設定では、データと電力の両方が同じケーブルで供給されるため、XIAOボードに別途電力を供給する必要がありません。
  1. 標準Ethernetケーブルの使用:

    • 通常のEthernetケーブル(PoEなし)を使用する場合は、一端をネットワークに、もう一端をXIAO W5500 Ethernet Adapterに接続します。この場合、Ethernetケーブルはデータ接続のみを提供するため、XIAOボードにUSB-Cポート経由で安定した5V電源を別途供給する必要があります。

ヒント: Ethernetケーブルがセットアップに十分な長さで、良好な状態であることを確認して、信頼性の高い通信を保証してください。

リセットボタン

XIAO W5500 Ethernet Adapterにはリセットボタンが装備されています。デバイスのプログラムが期待通りに動作しない場合や、システムを再起動する必要がある場合は、リセットボタンを一度押すだけです。これによりデバイスが再起動し、プログラムが再初期化され、予期しない状態やエラーからの回復に役立ちます。

ESP32 Arduino Ethernetライブラリ

XIAO W5500 Ethernet Adapterは、ネットワーク接続にESP32 Arduino Ethernetライブラリを使用します。このライブラリは、Ethernet接続の管理、イベントの処理、およびESP32ベースボード上でのネットワークアプリケーションの構築のためのAPIと例を提供します。

詳細、高度な使用方法、および最新の更新については、公式Espressifドキュメントを参照してください:ESP32 Arduino Ethernetライブラリドキュメント

XIAO 例

必要なライブラリをインストールし、基本的な機能を理解したところで、XIAO W5500 Ethernet Adapter の実用的な例をいくつか見てみましょう。これらのデモは、始めるのに役立ち、独自のプロジェクトにコードを適応させる方法を示します。

ステップ 1. Arduino アプリケーションを起動します。


ステップ 2. 開発ボードモデルを選択し、Arduino IDE に追加します。

  • 後のルーチンで Seeed Studio XIAO ESP32-S3 Plus を使用するには、このチュートリアル を参照して追加を完了してください。

ステップ 3. 必要な材料

以下の例を完了するには、下記のハードウェアが必要です。XIAO W5500 Ethernet Adapter に加えて、セットアップに十分な長さのイーサネットケーブルがあることを確認してください。Power over Ethernet(PoE)機能付きのケーブル、または標準のイーサネットケーブルを使用できます。標準のイーサネットケーブル(PoE なし)を使用する場合は、XIAO ボードが安定した 5V 電源で別途電源供給されていることを確認してください。

XIAO W5500 Ethernet Adapter

デモ 1: Ethernet イベントロガー

目的: このデモは、MAC アドレスと現在の IP アドレス(DHCP によって割り当てられた)を含む Ethernet イベントをシリアルコンソールにログ出力します。W5500 Ethernet インターフェースを初期化し、そのステータスを監視する方法を実演します。

典型的な使用例: ハードウェアセットアップとネットワーク接続を確認するための出発点として使用してください。デバッグや、Ethernet ステータスを監視したり、ネットワークイベントをログ出力したりする必要があるプロジェクトに役立ちます。

#include <SPI.h>
#include <ETH.h>
#include <WiFi.h>

static bool eth_connected = false;

#ifndef ETH_PHY_CS
#define ETH_PHY_TYPE ETH_PHY_W5500
#define ETH_PHY_ADDR 1
#define ETH_PHY_CS D1
#define ETH_PHY_IRQ -1
#define ETH_PHY_RST -1
#endif

// SPI pins
#define ETH_SPI_SCK D8
#define ETH_SPI_MISO D9
#define ETH_SPI_MOSI D10


// React to Ethernet events:
void onEvent(arduino_event_id_t event, arduino_event_info_t info)
{
switch (event) {

case ARDUINO_EVENT_ETH_START:
// This will happen during setup, when the Ethernet service starts
Serial.println("ETH Started");
//set eth hostname here
ETH.setHostname("esp32-ethernet");
break;

case ARDUINO_EVENT_ETH_CONNECTED:
// This will happen when the Ethernet cable is plugged
Serial.println("ETH Connected");
break;

case ARDUINO_EVENT_ETH_GOT_IP:
// This will happen when we obtain an IP address through DHCP:
Serial.print("Got an IP Address for ETH MAC: ");
Serial.print(ETH.macAddress());
Serial.print(", IPv4: ");
Serial.print(ETH.localIP());
if (ETH.fullDuplex()) {
Serial.print(", FULL_DUPLEX");
}
Serial.print(", ");
Serial.print(ETH.linkSpeed());
Serial.println("Mbps");
eth_connected = true;

// Uncomment to automatically make a test connection to a server:
// testClient( "192.168.0.1", 80 );

break;

case ARDUINO_EVENT_ETH_DISCONNECTED:
// This will happen when the Ethernet cable is unplugged
Serial.println("ETH Disconnected");
eth_connected = false;
break;

case ARDUINO_EVENT_ETH_STOP:
// This will happen when the ETH interface is stopped but this never happens
Serial.println("ETH Stopped");
eth_connected = false;
break;

default:
break;
}
}

// Try to read something from a webserver:
void testClient(const char * host, uint16_t port)
{
Serial.print("\nConnecting to ");
Serial.print(host);
Serial.print(":");
Serial.println(port);

NetworkClient client;
if (!client.connect(host, port)) {
Serial.println("connection failed");
return;
}
client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
while (client.connected() && !client.available());
while (client.available()) {
Serial.write(client.read());
}

Serial.println("closing connection\n");
client.stop();
}

// Initializing everything at start up / after reset:
void setup()
{
// Wait for the hardware to initialize:
delay(500);

// This sketch will log some information to the serial console:
Serial.begin(115200); // Assuming computer will be connected to serial port at 115200 bauds
Serial.println("Setup...");

Serial.println("Registering event handler for ETH events...");
Network.onEvent(onEvent);

// Starth Ethernet (this does NOT start WiFi at the same time)
Serial.println("Starting ETH interface...");
SPI.begin(ETH_SPI_SCK, ETH_SPI_MISO, ETH_SPI_MOSI);
ETH.begin(ETH_PHY_TYPE, ETH_PHY_ADDR, ETH_PHY_CS, ETH_PHY_IRQ, ETH_PHY_RST, SPI);

Serial.println("Waiting for Ethernet connection");
while (!eth_connected) {
delay(500);
Serial.print(".");
}
}

void loop()
{
if (eth_connected) {
testClient("baidu.com", 80);
}
delay(20000);
}

シリアルモニターを115200ボーで開いて、Ethernetイベントとip情報を確認してください。コードは接続テストとして20秒ごとに"baidu.com"への接続を試行します。

カスタマイズ:

  • testClient("baidu.com", 80);のテストサーバーを独自のサーバーまたはローカルネットワークデバイスに変更してください。
  • イベントハンドラーを使用してネットワークイベントでカスタムアクションをトリガーしてください。

デモ2: シンプルなEthernet Webサーバー

目的: このデモは、W5500 Ethernet Adapterを使用してXIAO ESP32-S3上に基本的なHTTP Webサーバーを設定します。ルートURLでのリクエストに応答し、不明なルートに対してシンプルな404ハンドラーを提供します。

典型的な使用例: 有線Ethernet接続を介してデバイスから直接WebページやREST APIを提供したいIoTプロジェクトに最適です。

#include <ETH.h>
#include <WebServer.h>
#include <ESPmDNS.h>


#ifndef ETH_PHY_CS
#define ETH_PHY_TYPE ETH_PHY_W5500
#define ETH_PHY_ADDR 1
#define ETH_PHY_CS D1
#define ETH_PHY_IRQ -1
#define ETH_PHY_RST -1
#endif

// SPI pins
#define ETH_SPI_SCK D8
#define ETH_SPI_MISO D9
#define ETH_SPI_MOSI D10

static bool eth_connected = false;
WebServer server(80);

// ESP32-POE doesn't have an onboard LED so if you want to use a LED you have to attach one to the extended pins on either UEXT or one of the 10 pin extentions.
// in this example the default value is 13 which is UEXT pin 6, or Extention 2 pin 1. If you want to attach the LED to another pin you need to change this value accordingly.
const int led_pin = 21;

// Web Server: handle a request to / (root of the server)
void handleRoot() {
digitalWrite(led_pin, 1);
server.send(200, "text/plain", "hello from esp32!");
delay(100); // Wait x ms so we have time to see the Led blinking
digitalWrite(led_pin, 0);
}

// Web Server: handle a request to an unknown URI (unknown "File")
void handleNotFound() {
digitalWrite(led_pin, 1);
String message = "File Not Found\n\n";
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET) ? "GET" : "POST";
message += "\nArguments: ";
message += server.args();
message += "\n";
for (uint8_t i = 0; i < server.args(); i++) {
message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
}
server.send(404, "text/plain", message);
// digitalWrite(led_pin, 0); // If this is commented out, the LED will stay on in case of 404 error
}

// Handle Ethernet Events:
void onEvent(arduino_event_id_t event, arduino_event_info_t info)
{
switch (event) {

case ARDUINO_EVENT_ETH_START:
// This will happen during setup, when the Ethernet service starts
Serial.println("ETH Started");
//set eth hostname here
ETH.setHostname("esp32-ethernet");
break;

case ARDUINO_EVENT_ETH_CONNECTED:
// This will happen when the Ethernet cable is plugged
Serial.println("ETH Connected");
break;

case ARDUINO_EVENT_ETH_GOT_IP:
// This will happen when we obtain an IP address through DHCP:
Serial.print("Got an IP Address for ETH MAC: ");
Serial.print(ETH.macAddress());
Serial.print(", IPv4: ");
Serial.print(ETH.localIP());
if (ETH.fullDuplex()) {
Serial.print(", FULL_DUPLEX");
}
Serial.print(", ");
Serial.print(ETH.linkSpeed());
Serial.println("Mbps");
eth_connected = true;

// Uncomment to automatically make a test connection to a server:
// testClient( "192.168.0.1", 80 );

break;

case ARDUINO_EVENT_ETH_DISCONNECTED:
// This will happen when the Ethernet cable is unplugged
Serial.println("ETH Disconnected");
eth_connected = false;
break;

case ARDUINO_EVENT_ETH_STOP:
// This will happen when the ETH interface is stopped but this never happens
Serial.println("ETH Stopped");
eth_connected = false;
break;

default:
break;
}
}

// Try to read something from a webserver:
void testClient(const char * host, uint16_t port)
{
Serial.print("\nConnecting to ");
Serial.print(host);
Serial.print(":");
Serial.println(port);

NetworkClient client;
if (!client.connect(host, port)) {
Serial.println("connection failed");
return;
}
client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
while (client.connected() && !client.available());
while (client.available()) {
Serial.write(client.read());
}

Serial.println("closing connection\n");
client.stop();
}

// Initializing everything at start up / after reset:
void setup()
{
// Wait for the hardware to initialize:
delay(500);

// This sketch will log some information to the serial console:


Serial.begin(115200); // Assuming computer will be connected to serial port at 115200 bauds
Serial.print("Setup...");


Serial.print("Registering event handler for ETH events...");
Network.onEvent(onEvent);

// Starth Ethernet (this does NOT start WiFi at the same time)
Serial.print("Starting ETH interface...");
SPI.begin(ETH_SPI_SCK, ETH_SPI_MISO, ETH_SPI_MOSI, ETH_PHY_CS);
ETH.begin(ETH_PHY_TYPE, ETH_PHY_ADDR, ETH_PHY_CS, ETH_PHY_IRQ, ETH_PHY_RST, SPI);


// multicast DNS (mDNS) allows to resolve hostnames to IP addresses without a DNS server
if (MDNS.begin("esp32")) { // using mDNS name "esp32"
Serial.println("MDNS responder started");
}

// Web Server handlers:
// Handle a request to / (root of the server)
server.on("/", handleRoot);
// Minimalistic handling of another URI (LED will not flash on this one):
server.on("/inline", []() {
server.send(200, "text/plain", "this works as well");
});
// Handle all other URIs:
server.onNotFound(handleNotFound);

server.begin();
Serial.println("HTTP server started");

pinMode( led_pin, OUTPUT); // Initialize the LED pin as a digital output (on/off)
}

void loop ()
{
server.handleClient();
delay(2);//allow the cpu to switch to other tasks
}

デバイスがIPアドレスを取得したら(シリアルモニターに表示されます)、ブラウザを開いて http://<your_device_ip>/ にアクセスしてください。ルートエンドポイントは「hello from esp32!」と応答し、LEDが点滅します。/inline や他のパスにアクセスして、異なる応答を確認してみてください。

カスタマイズ:

  • server.on("/yourpath", handlerFunction); を使用してより多くのエンドポイントを追加します。
  • センサー読み取り値やデバイス制御をWebサーバーの応答に統合します。

デモ 3: Ethernetカメラストリーミングサーバー

注意: このデモには XIAO ESP32-S3 Sense ボードのカメラモジュールが必要です。XIAO W5500 Ethernet Adapter自体にはカメラは含まれておらず、カメラソケットは現在単体で販売されていません。以前にXIAO ESP32-S3 Senseボードを購入したことがある場合は、そのカメラをこのデモで使用できます。きれいに設置するには、リソースセクションでこのセットアップと互換性のあるカメラ穴付きの3Dプリント可能なエンクロージャーを参照してください。

目的: この高度なデモは、XIAO ESP32-S3カメラモジュールとW5500 Ethernet Adapterを組み合わせて、Ethernet経由でカメラ画像をストリーミングします。カメラの初期化、Ethernetインターフェースの設定、ビデオストリーミング用のWebサーバーの開始方法を実演します。

典型的な使用例: 監視、リモートモニタリング、または信頼性の高い有線接続でリアルタイム画像ストリーミングが必要なプロジェクトに最適です。

tip

以下のプログラムは.inoファイル専用で、このプログラムをコンパイルするにはいくつかのヘッダーファイルが必要です。プロジェクトの完全なソースコードは以下のリンクから入手できます。


#include "esp_camera.h"
#include <ETH.h>
#include <WiFi.h> // For event handling

// Define the camera model being used
#define CAMERA_MODEL_XIAO_ESP32S3 // Has PSRAM

// Include camera pin definitions
#include "camera_pins.h"

#define USE_TWO_ETH_PORTS 0

// Ethernet PHY and SPI pin definitions (adjust according to your hardware)
#ifndef ETH_PHY_CS
#define ETH_PHY_TYPE ETH_PHY_W5500
#define ETH_PHY_ADDR 1
#define ETH_PHY_CS D1
#define ETH_PHY_IRQ -1
#define ETH_PHY_RST -1
#endif

#define ETH_SPI_SCK D8
#define ETH_SPI_MISO D9
#define ETH_SPI_MOSI D10

// Global variable to track Ethernet connection status
static bool eth_connected = false;

// Function declarations
void startCameraServer();
void setupLedFlash(int pin);
void onEvent(arduino_event_id_t event, arduino_event_info_t info);

void setup() {
Serial.begin(115200);
delay(2000);
// Register Ethernet event handler
Network.onEvent(onEvent);

// Initialize SPI and Ethernet
SPI.begin(ETH_SPI_SCK, ETH_SPI_MISO, ETH_SPI_MOSI, ETH_PHY_CS);
ETH.begin(ETH_PHY_TYPE, ETH_PHY_ADDR, ETH_PHY_CS, ETH_PHY_IRQ, ETH_PHY_RST, SPI);

// Wait for Ethernet connection
Serial.print("Waiting for Ethernet connection");
while (!eth_connected) {
delay(500);
Serial.print(".");
}

Serial.println("");
Serial.println("Ethernet connected");

Serial.setDebugOutput(true);
Serial.println();

// Camera configuration structure
camera_config_t config;
config.ledc_channel = LEDC_CHANNEL_0;
config.ledc_timer = LEDC_TIMER_0;
config.pin_d0 = Y2_GPIO_NUM;
config.pin_d1 = Y3_GPIO_NUM;
config.pin_d2 = Y4_GPIO_NUM;
config.pin_d3 = Y5_GPIO_NUM;
config.pin_d4 = Y6_GPIO_NUM;
config.pin_d5 = Y7_GPIO_NUM;
config.pin_d6 = Y8_GPIO_NUM;
config.pin_d7 = Y9_GPIO_NUM;
config.pin_xclk = XCLK_GPIO_NUM;
config.pin_pclk = PCLK_GPIO_NUM;
config.pin_vsync = VSYNC_GPIO_NUM;
config.pin_href = HREF_GPIO_NUM;
config.pin_sccb_sda = SIOD_GPIO_NUM;
config.pin_sccb_scl = SIOC_GPIO_NUM;
config.pin_pwdn = PWDN_GPIO_NUM;
config.pin_reset = RESET_GPIO_NUM;
config.xclk_freq_hz = 20000000;
config.frame_size = FRAMESIZE_UXGA;
config.pixel_format = PIXFORMAT_JPEG; // Use JPEG for streaming
config.grab_mode = CAMERA_GRAB_WHEN_EMPTY;
config.fb_location = CAMERA_FB_IN_PSRAM;
config.jpeg_quality = 12;
config.fb_count = 1;

// Adjust configuration based on PSRAM availability
if (config.pixel_format == PIXFORMAT_JPEG) {
if (psramFound()) {
config.jpeg_quality = 10;
config.fb_count = 2;
config.grab_mode = CAMERA_GRAB_LATEST;
} else {
config.frame_size = FRAMESIZE_SVGA;
config.fb_location = CAMERA_FB_IN_DRAM;
}
} else {
config.frame_size = FRAMESIZE_240X240;
#if CONFIG_IDF_TARGET_ESP32S3
config.fb_count = 2;
#endif
}

#if defined(CAMERA_MODEL_ESP_EYE)
// Special pin setup for ESP-EYE
pinMode(13, INPUT_PULLUP);
pinMode(14, INPUT_PULLUP);
#endif

// Initialize the camera
esp_err_t err = esp_camera_init(&config);
if (err != ESP_OK) {
Serial.printf("Camera init failed with error 0x%x", err);
return;
}

// Adjust sensor settings for specific camera modules
sensor_t *s = esp_camera_sensor_get();
if (s->id.PID == OV3660_PID) {
s->set_vflip(s, 1); // Vertical flip
s->set_brightness(s, 1); // Increase brightness
s->set_saturation(s, -2); // Decrease saturation
}
if (config.pixel_format == PIXFORMAT_JPEG) {
s->set_framesize(s, FRAMESIZE_QVGA); // Lower initial frame size
}

#if defined(CAMERA_MODEL_M5STACK_WIDE) || defined(CAMERA_MODEL_M5STACK_ESP32CAM)
s->set_vflip(s, 1);
s->set_hmirror(s, 1);
#endif

#if defined(CAMERA_MODEL_ESP32S3_EYE)
s->set_vflip(s, 1);
#endif

// Setup LED flash if the pin is defined
#if defined(LED_GPIO_NUM)
setupLedFlash(LED_GPIO_NUM);
#endif

// Start the camera web server
startCameraServer();

// Print the access URL to the serial monitor
Serial.print("Camera Ready! Use 'http://");
Serial.print(ETH.localIP());
Serial.println("' to connect");
}

void loop() {
// No additional processing needed; camera server runs in another task
delay(10000);
}

// Ethernet event handler
void onEvent(arduino_event_id_t event, arduino_event_info_t info) {
switch (event) {
case ARDUINO_EVENT_ETH_START:
Serial.println("ETH Started");
// Set Ethernet hostname here
ETH.setHostname("esp32-eth0");
break;
case ARDUINO_EVENT_ETH_CONNECTED:
Serial.println("ETH Connected");
break;
case ARDUINO_EVENT_ETH_GOT_IP:
Serial.printf("ETH Got IP: '%s'\n", esp_netif_get_desc(info.got_ip.esp_netif));
Serial.println(ETH);
eth_connected = true;
break;
case ARDUINO_EVENT_ETH_LOST_IP:
Serial.println("ETH Lost IP");
eth_connected = false;
break;
case ARDUINO_EVENT_ETH_DISCONNECTED:
Serial.println("ETH Disconnected");
eth_connected = false;
break;
case ARDUINO_EVENT_ETH_STOP:
Serial.println("ETH Stopped");
eth_connected = false;
break;
default:
break;
}
}

ネットワークに接続した後、シリアルモニターを開いてデバイスのIPアドレスを確認してください。ブラウザにIPアドレスを入力してカメラストリームにアクセスしてください。

カスタマイズ:

  • camera_config_t構造体でカメラ設定(解像度、品質、フレームサイズ)を調整してください。
  • Webサーバーコードを変更して認証や追加のエンドポイントを追加してください。
  • カスタムハードウェアに合わせてEthernetピン定義を調整してください。

FAQ

Q1: W5500アダプターのネットワーク信号が悪いのはなぜですか?解決策はありますか?

WiFiを使用するすべてのコード内に送信電力を調整するコードセグメントを追加することが可能で、送信電力を調整することで信号強度を大幅に改善できます。

以下のコードスニペットのように、Setup()内に電力を調整する機能を追加します。

    // 1. Set WiFi to Station mode
WiFi.mode(WIFI_STA);

// 2. Adjust WiFi transmit power (Key correction)
int8_t power_dbm = 15;
int8_t power_param = (int8_t)(power_dbm / 0.25);
esp_err_t err = esp_wifi_set_max_tx_power(power_param);

if (err == ESP_OK) {
Serial.print("Successfully set WiFi TX Power to: ");
Serial.print(power_dbm);
Serial.println(" dBm");
} else {
Serial.println("Failed to set WiFi TX Power.");
}

// 3. Start connecting to WiFi
WiFi.begin(ssid, password);

Serial.print("Connecting to WiFi network: ");
Serial.println(ssid);

上記のコードに電力を設定することで、最良の結果が得られることが確認されています。

リソース

技術サポート & 製品ディスカッション

私たちの製品をお選びいただき、ありがとうございます!私たちは、お客様の製品体験が可能な限りスムーズになるよう、さまざまなサポートを提供しています。異なる好みやニーズに対応するため、複数のコミュニケーションチャンネルを用意しています。

Loading Comments...