https://github.com/wemos/D1_mini_Examples/blob/master/examples/01.Basics/Blink/Blink.ino

#define ESP8266_LED 2

void setup() 
{
  pinMode(ESP8266_LED, OUTPUT);
}

void loop() 
{
  digitalWrite(ESP8266_LED, HIGH);
  delay(500);
  digitalWrite(ESP8266_LED, LOW);
  delay(500);
}

Archiving built core (caching) in: C:\Users\shvtech\AppData\Local\Temp\arduino_cache_926563\core\core_esp8266_esp8266_d1_mini_CpuFrequency_80,FlashSize_4M1M,LwIPVariant_v2mss536,Debug_Disabled,DebugLevel_None____,FlashErase_none,UploadSpeed_921600_a936be12b5d0c445df576e2f5ecadf8d.a
最大1044464バイトのフラッシュメモリのうち、スケッチが246315バイト(23%)を使っています。
最大81920バイトのRAMのうち、グローバル変数が32272バイト(39%)を使っていて、ローカル変数で49648バイト使うことができます。
Uploading 250464 bytes from C:\Users\shvtech\AppData\Local\Temp\arduino_build_1696/sketch_apr29a.ino.bin to flash at 0x00000000
................................................................................ [ 32% ]
................................................................................ [ 65% ]
................................................................................ [ 97% ]
.....                                                                            [ 100% ]


admin 2018/04/30 22:03

Upload Speedを115200bpsにしたらうまく動作した!!

scan start
scan done
9 networks found
1: wx0-5b23 (-82)*
2: AirPrt282 (-92)*
3: Guest282 (-90)*
4: elecomg-8B0 (-83)*
5: e-timer-8B0 (-83)*
6: 4CE95B (-96)*
7: aterm-cc4-g (-90)*
8: aterm-cc4-gw (-89)*
9: 000-Arac (-44)*
#include "ESP8266WiFi.h"

void setup() {
  Serial.begin(115200);

  Set WiFi to station mode & disconnect from an AP if it was previously connected
  WiFi.mode(WIFI_STA);
  WiFi.disconnect();
  delay(100);

  Serial.println("Setup done");
}

void loop() {
  Serial.println("scan start");

  WiFi.scanNetworks will return the number of networks found
  int n = WiFi.scanNetworks();
  Serial.println("scan done");
  if (n == 0)
    Serial.println("no networks found");
  else
  {
    Serial.print(n);
    Serial.println(" networks found");
    for (int i = 0; i < n; ++i)
    {
      Print SSID & RSSI for each network found
      Serial.print(i + 1);
      Serial.print(": ");
      Serial.print(WiFi.SSID(i));
      Serial.print(" (");
      Serial.print(WiFi.RSSI(i));
      Serial.print(")");
      Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*");
      delay(10);
    }
  }
  Serial.println("");

  Wait a bit before scanning again
  delay(10000);
}



  • diy/electronics/myesp8266.txt
  • Last modified: 2018/08/01 17:28
  • by admin