开发板环境配置

一、WeMos D1
1、打开Arduino IDE(楼主当前版本是1.8.9)-> 首选项 -> 附加开发板管理器网址,填入:http://arduino.esp8266.com/stable/package_esp8266com_index.json,重启一下IDE
2、工具-> 开发板 -> 点击开发板管理器->滚到最下面 选择esp8266 by ESP8266 Community 版本选最新的就好,搬梯子会快一些,用国内网总是失败
3、连接板子,安装驱动,否则端口号(COMx无法选择)
在这里插入图片描述

4、测试连接:打开arduino的IDE界面,工具–》开发板 选择WeMos D1 R1,插上板子,看看计算机识别的串口是那个,板子上带了个CH340的usb转ttl的芯片,要先装好驱动。在 工具–》端口 选择好串口号。最后在 文件–》示例–》esp8266–》blink。一个点灯的程序就出来了。点击向右箭头的图标,就能编译上传了。一切都很顺利。8266模块的灯也开始闪烁了。

void setup() {
  pinMode(D2, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(D2, 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 second
  digitalWrite(D2, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(1000);                      // Wait for two seconds (to demonstrate the active low LED)
}
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值