
{"id":3686,"date":"2016-02-29T16:56:08","date_gmt":"2016-02-29T07:56:08","guid":{"rendered":"https:\/\/okiraku-camera.tokyo\/blog\/?p=3686"},"modified":"2016-03-02T21:59:38","modified_gmt":"2016-03-02T12:59:38","slug":"wroom-02%e7%9b%b8%e4%ba%92%e9%96%93%e3%81%ae%e9%80%9a%e4%bf%a1%e3%81%a7%e3%83%8f%e3%83%9e%e3%83%ab","status":"publish","type":"post","link":"https:\/\/okiraku-camera.tokyo\/blog\/?p=3686","title":{"rendered":"WROOM-02\u76f8\u4e92\u9593\u306e\u901a\u4fe1\u3067\u30cf\u30de\u30eb"},"content":{"rendered":"<p>ESP-WROOM-02\u3067\u69cb\u6210\u3057\u305fwifi\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8+web\u30b5\u30fc\u30d0\u30fc\u306b\u3001\u3084\u306f\u308aESP-WROOM-02\u3067\u69cb\u6210\u3057\u305fwifi\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3+http\u30af\u30e9\u30a4\u30a2\u30f3\u30c8( +Arduino ADK)\u304b\u3089\u63a5\u7d9a\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001wifi-AP\u306b\u63a5\u7d9a\u3067\u304d\u306a\u3044\u3068\u3044\u3046\u554f\u984c\u306b\u76f4\u9762\u3057\u305f\u3002<br \/>\n\u306a\u304a\u3001\u4f7f\u7528\u4e2d\u306eWROOM-02\u306esdk\u30d0\u30fc\u30b8\u30e7\u30f3\u306f1.3.0\u3067\u3042\u308a\u3001\u305d\u306e\u5f8c\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3067\u306f\u52d5\u4f5c\u304c\u7570\u306a\u308b\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/02\/4c0417c774cc376d6c1597ac4034e2aa.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-3687\" src=\"https:\/\/okiraku-camera.tokyo\/blog\/wp-content\/uploads\/2016\/02\/4c0417c774cc376d6c1597ac4034e2aa-600x450.jpg\" alt=\"wroom02 x 2\" width=\"474\" height=\"356\" \/><\/a><\/p>\n<p>\u73fe\u5728\u306e\u69cb\u60f3\u3067\u306f\u3001\u30b9\u30de\u30db\u304b\u3089USB\u7d4c\u7531\u3067Arduino ADK\u306b\u6307\u793a\u3092\u3060\u3057\u3001Arduino ADK\u306eSerial1(Tx1, Rx1)\u3092\u4ecb\u3057\u3066\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u5074\u306eWROOM-02(<strong>STA-ESP\u3068\u8868\u8a18<\/strong>)\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u6587\u5b57\u5217\u3092\u9001\u308b\u3002STA-ESP\u306f\u3001\u305d\u306e\u5185\u5bb9\u3092\u89e3\u91c8\u3057\u3066wifi AP\u63a5\u7d9a\u3068http\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u5b9f\u884c\u3057\u3001\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u5074WROOM-02 (<strong>AP-ESP\u3068\u8868\u8a18<\/strong>)\u306b\u63a5\u7d9a\u3057\u305f2\u3064\u306e\u30b5\u30fc\u30dc\u3092\u99c6\u52d5\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u3002AP-ESP\u5074\u306e\u69cb\u6210\u306b\u3064\u3044\u3066\u306f\u00a0<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=3609\">ESP-WROOM-02\u306eWEB\u30b5\u30fc\u30d0\u30fc\u3067\u96fb\u52d5\u30b5\u30fc\u30dc\u96f2\u53f0<\/a>\u00a0\u3092\u53c2\u7167\u3002<\/p>\n<p>\u3059\u3093\u306a\u308a\u3067\u304d\u308b\u3068\u601d\u3063\u305f\u306e\u3060\u3051\u3069\u3001STA-ESP\u304b\u3089AP-ESP\u3078\u306ewifi\u63a5\u7d9a\u304c\u6210\u529f\u3057\u306a\u3044\u306e\u3067\u3042\u308b\u3002STA-ESP\u304b\u3089\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u306b\u51fa\u308b\u305f\u3081\u306ewifi\u30eb\u30fc\u30bf\u30fc\u3078\u306e\u63a5\u7d9a\u3084\u3001\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306eweb\u30b5\u30fc\u30d0\u30fc\u306b\u5bfe\u3059\u308b\u30ea\u30af\u30a8\u30b9\u30c8\u306f\u3059\u3093\u306a\u308a\u6210\u529f\u3057\u3066\u304f\u308c\u308b\u304c\u3001STA-ESP\u304b\u3089AP-ESP\u306b\u63a5\u7d9a\u3057\u3088\u3046\u3068\u3057\u3066\u3082\u3064\u306a\u304c\u3089\u306a\u3044\u3002\u691c\u8a3c\u306e\u305f\u3081\u3001AP\u5074STA\u5074\u3068\u3082\u306b\u5b9f\u9a13\u7528\u306e\u30b9\u30b1\u30c3\u30c1\u306b\u623b\u3057\u3066\u8a66\u3057\u3066\u307f\u305f\u3002<\/p>\n<h2>wifi-AP\u5074(AP-ESP)<\/h2>\n<p>\u4eca\u56de\u306e\u691c\u8a3c\u6642\u306b\u306f\u3001wifi\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8\u306e\u69cb\u6210\u304a\u3088\u3073\u30b9\u30b1\u30c3\u30c1\u3068\u3057\u3066\u3001http\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u5fdc\u3058\u3066LED\u3092\u30c1\u30ab\u30c1\u30ab\u3055\u305b\u305f\u3068\u304d\u306e\u3082\u306e\u3092\u4f7f\u3063\u305f(<a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=3426\">ESP-WROOM-02\u306eWEB\u30b5\u30fc\u30d0\u30fc\u3067LED\u3092\u30c1\u30ab\u30c1\u30ab\u3055\u305b\u3066\u307f\u308b<\/a>)\u3002\u3053\u306e\u69cb\u6210\u306f\u3001<br \/>\n<strong><em>http:\/\/192.168.4.1\/cmd?LED=led_options\u00a0<\/em><\/strong>\u3068\u3044\u3046\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u3051\u4ed8\u3051\u308b\u3068\u3001led_options\u306e\u5185\u5bb9\u306b\u5fdc\u3058\u3066LED\u306e\u30c1\u30ab\u30c1\u30ab\u5177\u5408\u3092\u5909\u3048\u308b\u3060\u3051\u306e\u3082\u306e\u3002<\/p>\n<h2>wifi-STA\u5074(STA-ESP)<\/h2>\n<p><a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=3409\">ESP-WROOM-02\u7528\u958b\u767a\u74b0\u5883\u3067\u30b9\u30b1\u30c3\u30c1\u3092\u52d5\u304b\u3059<\/a> \u3068\u3044\u3046\u9805\u3067\u4f7f\u3063\u305f\u30b9\u30b1\u30c3\u30c1\u3092\u82e5\u5e72\u624b\u76f4\u3057\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3092\u7528\u610f\u3057\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \">#include &lt;ESP8266WiFi.h&gt;\r\nextern \"C\" {\r\n  #include \"user_interface.h\"\r\n}\r\n\r\nstatic const char* my_ssid     = \"ESP8266AP2\";\r\nstatic const char* my_password = \"password\";\r\nstatic const char* remote_host = \"192.168.4.1\";\r\n\r\nvoid dead(const char* msg) {\r\n  Serial.println(msg);\r\n  for(;;) \/\/ stall..\r\n    delay(10);\r\n}\r\n\r\nvoid setup() {\r\n  Serial.begin(115200);\r\n  delay(10);\r\n  const char* cp = system_get_sdk_version();\r\n  if (cp)\r\n    Serial.println(\"\\nsystem_get_sdk_version() returns \" + String(cp) + \"\\n\");\r\n\/\/  WiFi.begin(\"dummy-ssid-abcd\", \"password\"); \/\/ connect to another esp8266\r\n\/\/  delay(500);\r\n  Serial.println(\"\\n\\nConnecting to AP...\");\r\n  WiFi.begin(my_ssid, my_password); \/\/ connect to another esp8266\r\n  WiFi.mode(WIFI_STA);\r\n  int n = 0;\r\n  int counter = 0;\r\n  while ((n = WiFi.status()) != WL_CONNECTED) {\r\n    Serial.print(String(n) + \" \");\r\n    delay(400);\r\n    if (counter++ &gt; 25) {\r\n      Serial.println(\"\\nwifi-connect failed\\nprintDiag()\\n\");\r\n      WiFi.printDiag(Serial);\r\n      dead(WiFi.localIP().toString().c_str());\r\n    }\r\n  }\r\n  Serial.println(\"\\nconnected. WiFi.printDiag()\\n\");\r\n  WiFi.printDiag(Serial);\r\n  Serial.println(WiFi.localIP().toString());\r\n  Serial.println(\"\");\r\n}\r\n\r\nvoid loop() {\r\n  delay(1);\r\n  Serial.println(\"connecting to \" + String(remote_host));\r\n  WiFiClient client;\r\n  if (!client.connect(remote_host, 80)) {\r\n    dead(\"connection failed\");\r\n  }\r\n  client.print(\"GET \/cmd?LED=blink2  HTTP\/1.1\\r\\nHost: \" + String(remote_host) + \"\\r\\nConnection: close\\r\\n\\r\\n\");\r\n  delay(10);\r\n  while(client.available()){\r\n    String line = client.readStringUntil('\\n');\r\n    Serial.println(line);\r\n  }\r\n  Serial.println();\r\n  Serial.println(\"closing connection\");\r\n  client.stop();\r\n  dead(\"finished.\");\r\n}<\/pre>\n<p>\u3053\u306e\u30b9\u30b1\u30c3\u30c1\u306f\u3001\u30b3\u30fc\u30c9\u306e\u5148\u982d\u4ed8\u8fd1\u306b\u3042\u308bAP\u306b\u63a5\u7d9a\u3067\u304d\u305f\u3089remote_host\u306bconnect()\u3057\u3001&#8221;\/cmd?LED=blink2&#8243;\u3068\u3044\u3046URI\u3092\u6295\u3052\u307e\u3059\u3088\u3001\u3068\u3044\u3046\u3060\u3051\u306e\u3082\u306e\u3067\u3001\u96fb\u6e90\u6295\u5165\u307e\u305f\u306f\u30ea\u30bb\u30c3\u30c8\u306b\u3088\u3063\u3066\u52d5\u4f5c\u3092\u958b\u59cb\u3059\u308b\u3002wifi AP\u3078\u306e\u63a5\u7d9a\u6210\u529f\uff0f\u5931\u6557\u6642\u3068\u3082\u306b\u3001<em>WiFi.printDiag(Serial);<\/em> \u306b\u3088\u3063\u3066\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3\u306e\u72b6\u614b\u3092\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u51fa\u529b\u3059\u308b\u3002<br \/>\n\u691c\u8a3c\u306e\u4e3b\u773c\u306f29\uff5e36\u884c\u76ee\u306ewhile()\u30eb\u30fc\u30d7\u3067\u306e\u00a0<em>WiFi.status()<\/em> \u306e\u53d6\u5f97\u3068\u8868\u793a\u306b\u3042\u308b\u3002<\/p>\n<h2>\u5b9f\u884c\u7d50\u679c\uff11<\/h2>\n<p>STA-ESP\u306e\u30ea\u30bb\u30c3\u30c8\u5f8c\u306e\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306b\u306f\u3001\u304a\u304a\u3088\u305d\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u305f\u3002<\/p>\n<pre class=\"striped:false show-plain-default:true lang:default decode:true\">system_get_sdk_version() returns 1.3.0\r\n\r\nConnecting to AP...\r\n0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 \r\nwifi-connect failed\r\nprintDiag()\r\n\r\nMode: STA\r\nPHY mode: N\r\nChannel: 1\r\nAP id: 0\r\nStatus: 0\r\nAuto connect: 0\r\nSSID (10): ESP8266AP2\r\nPassphrase (8): password\r\nBSSID set: 0\r\n0.0.0.0\r\n<\/pre>\n<p>Connecting to AP&#8230; \u884c\u306e\u4e0b\u306b27\u500b\u306e 0 \u304c\u4e26\u3093\u3067\u304a\u308a\u3001\u7d0410\u79d2\u9593\u306e\u9593\u3001<em>WiFi.status()<\/em>\u304c0 (\u00a0WL_IDLE_STATUS ) \u3092\u8fd4\u3057\u7d9a\u3051\u305f\u3053\u3068\u3092\u793a\u3057\u3066\u3044\u308b\u3002WL_IDLE_STATUS (SDK\u3067\u306fSTATION_IDLE) \u3068\u3044\u3046\u306e\u306f\u3001AP\u63a5\u7d9a\u8981\u6c42\u304c\u5b9f\u65bd\u3055\u308c\u3066\u3044\u306a\u3044\u306e\u3068\u540c\u3058\u610f\u5473\u3067\u306f\u306a\u3044\u306e\u304b\u306a\u3002<br \/>\n\u63a5\u7d9a\u3092\u3042\u304d\u3089\u3081\u305f\u5f8c\u306eprintDiag()\u306b\u306f\u8a2d\u5b9a\u610f\u56f3\u3068\u7570\u306a\u308b\u9805\u76ee\u306f\u306a\u3044\u3002AP\u306b\u63a5\u7d9a\u3067\u304d\u3066\u3044\u306a\u3044\u306e\u3067IP\u30a2\u30c9\u30ec\u30b9\u306f 0.0.0.0 \u306e\u307e\u307e\u3067\u3042\u308a\u3001\u3053\u308c\u306f\u6b63\u3057\u3044\u3002<\/p>\n<p>\u3053\u306e\u52d5\u4f5c\u306fSTA-ESP\u306e\u96fb\u6e90\u3092\u5165\u308c\u76f4\u3057\u3066\u3082\u540c\u3058\u3067\u3042\u308a\u3001\u8003\u3048\u3089\u308c\u308b\u3044\u308d\u3044\u308d\u306a\u3053\u3068\uff08WiFi.mode()\u3092AP\u306b\u3057\u3066\u304b\u3089STA\u306b\u3059\u308b\u3068\u304b\u3001\u9806\u5e8f\u3092\u5909\u3048\u3066\u307f\u308b\u3068\u304b\u3001static\u30a2\u30c9\u30ec\u30b9\u306b\u3057\u3066\u307f\u308b\u3068\u304b\u3001\u30b9\u30ea\u30fc\u30d7\u72b6\u614b\u3092\u5909\u3048\u3066\u307f\u308b\u3068\u304b\u306a\u3093\u3068\u304b\uff09\u3092\u3084\u3063\u3066\u3082\u5909\u5316\u304c\u306a\u304b\u3063\u305f\u3002<\/p>\n<h2>\u82e6\u866b\u7d1a\u306e\u56de\u907f\u7b56<\/h2>\n<p>PC\u3084\u30b9\u30de\u30db\u306e\u30d6\u30e9\u30a6\u30b6\u304b\u3089AP-ESP\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u6295\u3052\u3066\u3001\u30b5\u30fc\u30dc\u306e\u52d5\u304d\u3092\u8a66\u3059\u5206\u306b\u306f\u554f\u984c\u306a\u304b\u3063\u305f\u306e\u3067\u3001STA\u5074\u306e\u30b9\u30b1\u30c3\u30c1\u3092\u30b5\u30e9\u30b5\u30e9\u66f8\u3044\u3066\u3001Arduino ADK\u306b\u63a5\u7d9a\u3057\u305f\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u304b\u3089\u30ea\u30af\u30a8\u30b9\u30c8\u30b3\u30de\u30f3\u30c9\u3092\u9001\u4fe1\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3068\u3053\u308d\u3067\u3001AP\u306b\u63a5\u7d9a\u3067\u304d\u306a\u3044\u554f\u984c\u306b\u76f4\u9762\u3057\u305f\u3002\u4ed6\u306ewifi\u30eb\u30fc\u30bf\u30fc\u7b49\u306b\u306f\u63a5\u7d9a\u3067\u304d\u308b\u306e\u306b\u3002<\/p>\n<p>\u3053\u306e\u3068\u304d\u3001\u4e00\u822c\u7684\u306awifi\u30eb\u30fc\u30bf\u30fc\u306b\u63a5\u7d9a\u3057\u3066\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u4e0a\u306eweb\u30b5\u30fc\u30d0\u30fc\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u6295\u3052\u3001\u305d\u306e\u5f8c\u306b\u00a0<em>WiFi.disconnect();<\/em> \u306b\u3088\u3063\u3066AP\u63a5\u7d9a\u3092\u5207\u3063\u3066AP-ESP\u3078\u306e\u63a5\u7d9a\u3092\u884c\u3046\u3068\u6210\u529f\u3059\u308b\u3053\u3068\u306b\u6c17\u304c\u4ed8\u3044\u305f\u3002\u3053\u3093\u306a\u611f\u3058\u306e\u30b9\u30b1\u30c3\u30c1\u3092\u4f7f\u3063\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \"> if (WiFi.status() == WL_CONNECTED) {  \/\/ \u63a5\u7d9a\u6e08\u3060\u304c\u3001\u5225\u306e\u3068\u3053\u308d\u304b\u3082\u3057\u308c\u306a\u3044\u3002\r\n   if (WiFi.SSID() != ssid)\r\n     WiFi.disconnect();\r\n   delay(250);\r\n }\r\n if (WiFi.status() != WL_CONNECTED) {\r\n   WiFi.begin(ssid.c_str(), password.c_str()); \r\n ....<\/pre>\n<p>\u3053\u306e\u30b3\u30fc\u30c9\u306f\u3001\u4e00\u5ea6AP-ESP\u306b\u63a5\u7d9a\u6e08\u306a\u3089\u3070wifi\u63a5\u7d9a\u306f\u8a66\u884c\u305b\u305a\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u884c\u3046\u304c\u3001\u5225\u306eAP\u306b\u63a5\u7d9a\u4e2d\u306a\u3089\u3070\u3064\u306a\u304e\u76f4\u3059\u3001\u3068\u3044\u3046\u3064\u3082\u308a\u3067\u66f8\u3044\u3066\u3044\u308b\u3002\u3069\u3046\u3084\u3089\u3001WiFi.begin()\u306e\u6642\u70b9\u3067\u3001status()\u304c\u00a0WL_IDLE_STATUS\u3067\u306a\u3051\u308c\u3070\u3001begin()\u306b\u3088\u3063\u3066\u63a5\u7d9a\u3057\u3066\u304f\u308c\u308b\u3088\u3046\u3060\u3063\u305f\u3002<\/p>\n<p>\u305f\u3060\u3001\u3044\u3063\u305f\u3093\u5225\u306eAP\u306b\u63a5\u7d9a\u3057\u3066\u304b\u3089\u306a\u3089\u3070\u3001AP-ESP\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3068\u3044\u3046\u306e\u306f\u6e80\u8db3\u3067\u304d\u308b\u7d50\u679c\u3067\u306f\u306a\u3044\u3002\u305f\u3068\u3048\u3070\u91ce\u5916\u3067\u30b5\u30fc\u30dc\u96f2\u53f0\uff08\u307e\u305f\u306f\u3001\u5225\u306eWROOM-02\u76f8\u4e92\u63a5\u7d9a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\uff09\u3092\u4f7f\u304a\u3046\u3068\u3044\u3046\u3068\u304d\u3001\u308f\u3056\u308f\u3056\u30b9\u30de\u30db\u306e\u30c6\u30b6\u30ea\u30f3\u30b0\u3092\u6709\u52b9\u306b\u3057\u3066\u3001\u305d\u3053\u306b\u63a5\u7d9a\u3057\u3066\u304b\u3089\u4f7f\u3046\u3068\u3044\u3046\u306e\u306f\u3001\u307e\u3063\u305f\u304f\u6c17\u304c\u9032\u307e\u306a\u3044\u3002<\/p>\n<p>\u305d\u3053\u3067\u3088\u3046\u3084\u304f\u305f\u3069\u308a\u7740\u3044\u305f\u306e\u304c\u3001\u4eca\u56de\u63b2\u8f09\u3057\u305f\u30b9\u30b1\u30c3\u30c1\u306e22,23\u884c\u76ee\u306e\u30b3\u30e1\u30f3\u30c8\u90e8\u5206\u3002\u3053\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u3066\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u305f\u30b9\u30b1\u30c3\u30c1\u3092\u8ee2\u9001\u3057\u3066\u3084\u308b\u3068AP-ESP\u306b\u63a5\u7d9a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002\u304b\u306a\u308a\u4e71\u66b4\u306a\u3084\u308a\u65b9\u3067\u306f\u3042\u308b\u304c\u3001\u8fd1\u6240\u306b\u3044\u306a\u3055\u305d\u3046\u306aSSID\u3092\u4f7f\u3063\u3066begin()\u3057\u3066\u304a\u304d\u3001\u305d\u306e\u5f8c\u306b\u672c\u6765\u306essid\u3092\u4f7f\u3063\u3066\u63a5\u7d9a\u3057\u3088\u3046\u3068\u3044\u3046\u3082\u306e\u3067\u3042\u308b\u3002\u82e6\u8089\u306e\u7b56\u3068\u3044\u3046\u3088\u308a\u3001\u82e6\u866b\u3092\u565b\u3093\u3060\u3088\u3046\u306a\u3059\u3063\u304d\u308a\u3057\u306a\u3044\u56de\u907f\u65b9\u6cd5\u3067\u306f\u3042\u308b\u304c\u3001\u3046\u307e\u304f\u3044\u3063\u305f\u306e\u3067\u63a1\u7528\u3059\u308b\u3053\u3068\u306b\u3057\u305f\u3002\u5b9f\u884c\u6642\u306e\u30b7\u30ea\u30a2\u30eb\u30e2\u30cb\u30bf\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u306b\u306a\u3063\u305f\u3002<\/p>\n<h2>\u5b9f\u884c\u7d50\u679c2<\/h2>\n<pre class=\"striped:false show-plain-default:true lang:default decode:true\">system_get_sdk_version() returns 1.3.0\r\n\r\nConnecting to AP...\r\n6 6 6 6 6 6 6 6 \r\nconnected. WiFi.printDiag()\r\nMode: STA\r\nPHY mode: N\r\nChannel: 1\r\nAP id: 0\r\nStatus: 5\r\nAuto connect: 0\r\nSSID (10): ESP8266AP2\r\nPassphrase (8): password\r\nBSSID set: 0\r\n192.168.4.2\r\n\r\nconnecting to 192.168.4.1\r\nHTTP\/1.1 200 OK\r\n....\r\nclosing connection\r\nfinished.\r\n<\/pre>\n<p>Connecting to AP&#8230; \u884c\u306e\u4e0b\u306b6 \u304c8\u3064\u306a\u3089\u3093\u3067\u3044\u308b\u304c\u3001status()\u304c\u8fd4\u30596\u306f\u5207\u65ad\u6e08\u3068\u3044\u3046\u72b6\u614b\u3092\u8868\u3057\u3066\u3044\u308b (WL_DISCONNECTED)\u3002\u3042\u308a\u3082\u3057\u306a\u3044SSID\u3092\u63a2\u7d22\u3057\u3066\u3044\u308b\u3068\u304d\u306b\u306f\u3001WL_DISCONNECTED\u306b\u306a\u308b\u306e\u3060\u308d\u3046\u3002\u30db\u30f3\u30c8\u306essid\u3092\u4f7f\u3063\u3066begin()\u3057\u305f\u7d043\u79d2\u5f8c\u306b\u63a5\u7d9a\u304c\u6210\u529f\u3057\u3001192.168.4.2 \u3068\u3044\u3046IP\u30a2\u30c9\u30ec\u30b9\u3092\u5f97\u3066\u3044\u308b\u3002<br \/>\nStatus: 5<br \/>\n\u3068\u306a\u3063\u3066\u3044\u308b\u304c\u30015 == WL_CONNECTED\u3067\u3042\u308b\u3002<\/p>\n<p>\u305d\u306e\u5f8c\u306f\u4e88\u5b9a\u901a\u308a\u306bhttp\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u6295\u3052\u3001\u30ec\u30b9\u30dd\u30f3\u30b9\u3092\u3082\u3089\u3063\u3066\u7d42\u4e86\u3057\u3066\u3044\u308b\u3002<\/p>\n<h2>\u304d\u3087\u3046\u306e\u307e\u3068\u3081<\/h2>\n<p>\u4eca\u56de\u306e\u63a5\u7d9a\u3067\u304d\u306a\u3044\u554f\u984c\u306b\u4f34\u3046\u75c7\u72b6\u306f\u5999\u306a\u8a71\u306b\u611f\u3058\u308b\u3002\u3046\u3061\u306b\u3042\u308bWROOM-02\u306e\u500b\u4f53\u304c\u304a\u304b\u3057\u3044\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3057\u3001SDK\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u306b\u3088\u3063\u3066\u89e3\u6c7a\u3059\u308b\u306e\u304b\u3082\u3057\u308c\u306a\u3044\u3002ESP8266WiFiClass\u304c\u30e9\u30c3\u30d7\u3057\u3066\u3044\u308bsdk\u306eapi\u30ec\u30d9\u30eb\u306b\u3082\u4e0b\u308a\u63a2\u3057\u3066\u307f\u305f\u304c\u3001\u3053\u308c\u3068\u3044\u3046\u56de\u907f\u7b56\u306f\u898b\u3064\u304b\u3089\u306a\u304b\u3063\u305f\u3002<\/p>\n<p>\u305d\u3046\u3044\u3048\u3070\u30011\u679a\u76ee\u306e\u5199\u771f\u306b\u5199\u3063\u3066\u3044\u308b\u3082\u306e\u3092\u89e3\u8aac\u3057\u3066\u304a\u304f\u3068\u3001\u5965\u306b\u3042\u308b\u4e2d\u578b\u306e\u30d6\u30ec\u30c3\u30c9\u30dc\u30fc\u30c9\u304cAP-ESP\u3092\u8f09\u305b\u305f\u3082\u306e\u3067\u30012\u53f0\u306e\u30b5\u30fc\u30dc\u3092\u99c6\u52d5\u3059\u308b\u56de\u8def\u5165\u308a\u3002\u4e2d\u592e\u624b\u524d\u304cSTA-ESP\u3067\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u6642\u306b\u306f\u305d\u306e\u5965\u306b\u3042\u308bUSB-\u30b7\u30ea\u30a2\u30eb\u306eFT-231X\u306e\u56de\u8def\u306b\u63a5\u7d9a\u3057\u3066\u3044\u308b\u3002<br \/>\nSTA-ESP\u306b\u306f\u3001\u624b\u524d\u53f3\u5074\u306eArduino ADK\u304b\u3089\u3001+5V\u304a\u3088\u3073GND\u3068\u3001RESET\u4fe1\u53f7\u3092\u4e0e\u3048\u3066\u3044\u3066\u3001Arduino\u306eRESET\u30dc\u30bf\u30f3\u3067\u30ea\u30bb\u30c3\u30c8\u304c\u304b\u304b\u308b\u3002\u3042\u308b\u7a0b\u5ea6\u30b9\u30b1\u30c3\u30c1\u304c\u56fa\u307e\u3063\u305f\u3089\u3001FT-231X\u306f\u304a\u5f79\u5fa1\u514d\u3067\u3001Arduino ADK\u3068\u30b7\u30ea\u30a2\u30eb\u63a5\u7d9a\u3059\u308b\u3053\u3068\u306b\u306a\u308b\u3002<br \/>\nSTA-ESP\u306b\u306f\u3001Arduino ADK\u3067\u306f\u306a\u304f\u30b8\u30e7\u30a4\u30b9\u30c6\u30a3\u30c3\u30af\u3092A\/D\u30b3\u30f3\u30d0\u30fc\u30bf\u7d4c\u7531\u3067\u63a5\u7d9a\u3059\u308b\u6848\u3082\u3042\u308a\u3001\u307e\u3060\u307e\u3060\u904a\u3079\u305d\u3046\u3067\u306f\u3042\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ESP-WROOM-02\u3067\u69cb\u6210\u3057\u305fwifi\u30a2\u30af\u30bb\u30b9\u30dd\u30a4\u30f3\u30c8+web\u30b5\u30fc\u30d0\u30fc\u306b\u3001\u3084\u306f\u308aESP-WROOM-02\u3067\u69cb\u6210\u3057\u305fwifi\u30b9\u30c6\u30fc\u30b7\u30e7\u30f3+http\u30af\u30e9\u30a4\u30a2\u30f3\u30c8( +Arduino ADK)\u304b\u3089\u63a5\u7d9a\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u3001wif &hellip; <a href=\"https:\/\/okiraku-camera.tokyo\/blog\/?p=3686\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">WROOM-02\u76f8\u4e92\u9593\u306e\u901a\u4fe1\u3067\u30cf\u30de\u30eb<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[69],"tags":[65,70],"class_list":["post-3686","post","type-post","status-publish","format-standard","hentry","category-programming","tag-arduino","tag-esp8266"],"_links":{"self":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3686"}],"version-history":[{"count":0,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=\/wp\/v2\/posts\/3686\/revisions"}],"wp:attachment":[{"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/okiraku-camera.tokyo\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}