blinker快速开始指南(esp32 WiFi接入)
本帖最后由 三水 于 2018-3-10 22:29 编辑1.硬件准备
ESP32开发板可以接入的无线网络
2.软件准备
Arduino IDE 中按 安装方法 安装 esp32-arduino
Android 手机中安装 Blinker APP
IOS版本待上线
3.下载blinker-library
下载blinker-library
打开Arduino IDE,在菜单栏中点击 项目>加载库>添加一个 .ZIP库
选择刚才下载的 blinker-library.zip
IDE显示 "库已经加入,请检查”导入库“菜单" 表示添加库成功
4.下载示例代码
在 Arduino IDE 菜单栏中点击 文件>示例>Blinker>Blinker_Button>Button_WiFi
打开 Button_BLE 示例后,在示例中配置开发板信息
工具>开发板选择对应的ESP32开发板型号
工具>端口 选择对应的端口
char ssid[] = "<Your WiFi network SSID or name>";
char pswd[] = "<Your WiFi network WPA password or WEP key>";
填写将接入的无线网络名(ssid)与密码(pswd)
完成开发板配置后点击上传,等待示例编译下载完成
下载完成后打开串口监视器显示如下,表示示例下载成功
5.添加设备
https://clz.me/wp-content/uploads/2018/03/blinker-gif1.gif
https://clz.me/wp-content/uploads/2018/03/blinker-gif2.gif
完成设备添加后,添加一个按键(Button)
将按键的数据键名,如图中btn-gnk修改为ButtonKey
修改完成后锁定界面,点击按键即可板载LED的亮灭
Arduino:1.8.7 (Windows 10), 开发板:"ESP32 Dev Module, Disabled, Default, QIO, 80MHz, 4MB (32Mb), 921600, None"
In file included from C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerProtocol.h:4:0,
from C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Adapters/BlinkerArduinoWS.h:4,
from C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/BlinkerSimpleESP32_WS.h:4,
from C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker.h:17,
from C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\examples\Blinker_Button\Button_WiFi\Button_WiFi.ino:4:
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In constructor 'BlinkerButton::BlinkerButton()':
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:90:50: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
: buttonName(NULL), buttonState(false)
^
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In constructor 'BlinkerSlider::BlinkerSlider()':
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:110:46: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
: sliderName(NULL), sliderValue(0)
^
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In constructor 'BlinkerToggle::BlinkerToggle()':
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:128:50: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
: toggleName(NULL), toggleState(false)
^
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h: In constructor 'BlinkerRGB::BlinkerRGB()':
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\src/Blinker/BlinkerApi.h:146:27: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
: rgbName(NULL)
^
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\examples\Blinker_Button\Button_WiFi\Button_WiFi.ino: In function 'void setup()':
Button_WiFi:16:13: error: 'LED_BUILTIN' was not declared in this scope
pinMode(LED_BUILTIN, OUTPUT);
^
C:\Users\Administrator\Documents\Arduino\libraries\blinker-library-master\examples\Blinker_Button\Button_WiFi\Button_WiFi.ino: In function 'void loop()':
Button_WiFi:39:22: error: 'LED_BUILTIN' was not declared in this scope
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN));
^
"WiFiClient.h" 对应多个库
已使用: C:\Users\Administrator\Documents\Arduino\hardware\espressif\esp32\libraries\WiFi
未使用:C:\Program Files (x86)\Arduino\libraries\WiFi
未使用:C:\Program Files (x86)\Arduino\libraries\WiFi
未使用:C:\Program Files (x86)\Arduino\libraries\WiFi
未使用:C:\Program Files (x86)\Arduino\libraries\WiFi
exit status 1
'LED_BUILTIN' was not declared in this scope
garen 发表于 2018-10-22 13:49
Arduino:1.8.7 (Windows 10), 开发板:"ESP32 Dev Module, Disabled, Default, QIO, 80MHz, 4MB (32Mb), 92 ...
字面意思 未定义builtin led
1.自己定义一下 2.换成别的开发板 不选esp32 dev 如选nodemcu 32s 请问是连接到继电器再连接到esp8266还是直接连接和esp8266.它们对应的硬件连接口该连哪个,有图最好,谢谢 请问,Arduino Blinker esp32 蓝牙和wifi怎么共存
页:
[1]