LoginSignup
1
0

More than 5 years have passed since last update.

wifiの研究 その3

Posted at

概要

wifiを理解したかった。
wemosで、wifiに接続してみた。

結果

11g, WPA-PSKに、接続できた。

サンプルコード

#include <ESP8266WiFi.h>

const char * ssid = "001D736531AA_G";
const char * password = "";
WiFiServer server(80);
void setup() 
{
    Serial.begin(115200);
    delay(10);
    pinMode(2, OUTPUT);
    digitalWrite(2, 0);
    Serial.println();
    Serial.println();
    Serial.print("Connecting to ");
    Serial.println(ssid);
    WiFi.mode(WIFI_STA);
    WiFi.begin(ssid, password);
    while (WiFi.status() != WL_CONNECTED)
    {
        delay(500);
        Serial.print(".");
    }
    Serial.println("");
    Serial.println("WiFi connected");
    server.begin();
    Serial.println("Server started");
    Serial.println(WiFi.localIP());
}
void loop()
{
}



以上。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0