WeMos D1开发板以ESP8266WIFI开发板为基础,使用Arduino开发板的设计,工作电压为3.3V设计出来的开发板,这个开发板仅仅是使用了Arduino uno的布局设计,并不是Arduino的开发板。

下面是关于这块开发板的说明书:

总结下:

此开发板芯片为ESP8266(32位),缓存比Arduino Uno大,并且包含11个数字IO引脚以及1个模拟输入引脚,使用Micro-B type USB线进行连接。

下面是引脚方面的说明!

所有的引脚都需要跑到3.3V上,并且除了D0口其他口都支持interrupt/PWM/I2C/one-wire。

下面是在Arduino IDE中部署其开发环境

软件需要如下3个:

CH340G USB to UART driver: https://www.wemos.cc/downloads

Python 2.7: https://www.python.org/downloads/release/python-2713/

Arduino 1.8.2: https://www.arduino.cc/en/Main/Software

在Arduino的目录下新建2个文件夹esp8266com及esp8266

在Github上下载其库文件:

将压缩包放到esp8266目录下,然后解压:

将里面的文件移到到esp8266中,再将Arduino-master与Arduino-master.zip删掉。

最后变成这个样子即可!

打开CMD然后执行如下命名:

python get.py

此命令将会下载开发板所需要的工具,一切正常,且安装好将会是这样的。

这样就完成了安装!!!

使用Arduino IDE时要选中正确的开发板,Toos>Board中选择"WeMos D1 R2 & Mini"即可:

下面是几个示例代码:

Blink

/*ESP8266 Blink by Simon PeterBlink the blue LED on the ESP-01 moduleThis example code is in the public domainThe blue LED on the ESP-01 module is connected to GPIO1 (which is also the TXD pin; so we cannot use Serial.print() at the same time)Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/void setup() {pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}// the loop function runs over and over again forever
void loop() {digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (Note that LOW is the voltage level// but actually the LED is on; this is because // it is active low on the ESP-01)delay(1000);                      // Wait for a seconddigitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGHdelay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}

查看下芯片的ID,这里串口打印频率要选择115200

/*  Get Chip ID*  wemos.cc*  *  */void setup() {Serial.begin(115200);
}void loop() {Serial.println("");Serial.println("");Serial.println("Check ID in:");Serial.println("https://www.wemos.cc/verify_products");Serial.printf("Chip ID = %08Xn", ESP.getChipId());Serial.println("");Serial.println("");delay(5000);
}

运行一个简单的Web Server

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>const char* ssid = "........";
const char* password = "........";ESP8266WebServer server(80);const int led = 13;void handleRoot() {digitalWrite(led, 1);server.send(200, "text/plain", "Hello from esp8266!");digitalWrite(led, 0);
}void handleNotFound(){digitalWrite(led, 1);String message = "File Not Foundnn";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, 0);
}void setup(void){pinMode(led, OUTPUT);digitalWrite(led, 0);Serial.begin(115200);WiFi.begin(ssid, password);Serial.println("");// Wait for connectionwhile (WiFi.status() != WL_CONNECTED) {delay(500);Serial.print(".");}Serial.println("");Serial.print("Connected to ");Serial.println(ssid);Serial.print("IP address: ");Serial.println(WiFi.localIP());if (MDNS.begin("esp8266")) {Serial.println("MDNS responder started");}server.on("/", handleRoot);server.on("/inline", [](){server.send(200, "text/plain", "this works as well");});server.onNotFound(handleNotFound);server.begin();Serial.println("HTTP server started");
}void loop(void){server.handleClient();
}

ssid填写wifi名,password填写wifi密码

Arduino文档阅读笔记-WeMos D1 ESP8266 WIFI开发板入门相关推荐

  1. Arduino文档阅读笔记-4 WHEEL ROBOT CAR BASIC EXAMPLE

    Arduino小车有很多种,包括2个轮子,4个轮子.都有. 下面这个实例来做一个最基础的4轮小车,下面将说明各个功能和代码. 首先得先准备这样的一辆4个轮子的小车. 再选这样的一个扩展板: 电机控制板 ...

  2. Arduino文档阅读笔记-RFID工作原理及RC522模块介绍

    RFID工作原理 RFID(Radio Frequency Identification):无线射频识别 RFID由2个部分组成:应答器/标签被贴在某个物体上的东东.无线接收器用于读取应答器/标签上的 ...

  3. Arduino文档阅读笔记-attachInterrupt()

    attachInTerrupt() 有这个专业词要知道: Digital Pins:电子引脚 ISRs(Interrupt Service Routines):中断服务程序 ISR(Interrupt ...

  4. Qt文档阅读笔记-共享库的创建与调用

    使用共享库的符号 这个符号可以作用在变量.类.函数中,并且这些都可以被调用端使用. 在编译共享库中,需要使用export符号.在使用端调用的时候使用import符号. 这里是本人从文档中记录的笔记,大 ...

  5. Qt文档阅读笔记-加载HeightMap(高度图)构造3D地形图

    Qt文档阅读笔记-加载HeightMap(高度图)构造3D地形图 QHeightMapSurfaceDataProxy:是Q3DSurface的一个基本代理类. 他是专门加载高度图. 高度图是没有X, ...

  6. Qt文档阅读笔记-Rotations Example相关

    Rotations Example文档阅读笔记 使用这种方式,对y轴和z轴进行旋转. QQuaternion yRotation = QQuaternion::fromAxisAndAngle(0.0 ...

  7. FreeRTOS官方指导文档阅读笔记

    FreeRTOS官方指导文档阅读笔记 基于 161204_Mastering_the_FreeRTOS_Real_Time_Kernel-A_Hands-On_Tutorial_Guide.pdf,可 ...

  8. Wemos D1 R32 ESP32开发板OLED液晶屏显示

    目录 一.实验准备 二.实验代码 1.OLED液晶屏显示"Hello World" 2. OLED液晶满屏显示字符 3.OLED屏显示时钟 4.OLED屏显示矢量图片 5 OLED ...

  9. Blockly学习之文档阅读笔记

    文档阅读来源--谷歌官网介绍: https://developers.google.com/blockly/guides/overview 概述 一个用于Web.Android.iOS的可视化代码编辑 ...

最新文章

  1. Django博客系统注册(创建用户模块应用)
  2. fabric 简单理解
  3. import org.apache.http.xxxxxx 爆红,包不存在之解决办法
  4. 全志A33-ARM开发板通过NFS与Ubuntu共享文件
  5. 3.5 卷积神经网络进阶-Inception-mobile_net 实战
  6. Upload-Labs(1-5)
  7. 明年3月开卖!小米11超大杯有望搭载屏下摄像头技术
  8. 微信小程序背景音乐官方实例代码无效问题解决及音乐src获取方法
  9. 微信小程序底部突起半圆设计
  10. mac vulkan_基于 mac 的 ncnn vulkan iOS集成参考
  11. 易语言版{大智慧/分析家/飞狐交易师}DLL插件接口开发模块(beta),自定义股票软件公式扩展函数...
  12. Running MaxQuant——蛋白质组学建库软件(一)
  13. Mstar 648 平台遥控器/按键包POWER键配置
  14. 苹果5越狱教程_苹果新越狱工具发布,支持iOS 13最新版,详细安装教程看这里...
  15. allure报告定制
  16. 手机桌面计算机显示,手机如何显示在桌面?敬业签电脑手机同步云便签怎么在桌面显示便签?...
  17. 使用Python来操作邮箱
  18. 100代码搞定C语言游戏开发,编程原来如此简单
  19. 如何恢复 Linux 分区下误删的文件?
  20. 【文史】百家讲坛讲稿txt下载

热门文章

  1. 如何抓获JVM crash的幕后黑手
  2. 学习Windows2008——常用工具及命令(包括核心版部分命令)
  3. JavaScript中substr和substring
  4. 细节:关于异步调用的解决方案
  5. 程序员须知:必须建立个人知识库,它的重要性你需要了解一下!
  6. 调研了10家公司的技术架构,我总结出了一套大数据平台的套路
  7. python的错误处理——try语句
  8. 写日历的程序员,你必须弄懂的中国农历算法。
  9. 【飞秋】微软简化Visual Studio 非程序员也能开发软件
  10. 浅谈SQL中存储过程和自定义函数的区