所以我今天得到了我的 Arduino Uno。对于一个项目,我希望能够通过 Wifi(通过 Blynk 应用程序)控制我的 Arduino 上的一些继电器。为此,我想将 ESP8266-01 用作 Wifi 防护罩。
唯一不同的是我用的是Win10。这是我得到的:
- Arduino Uno R3
- Arduino IDE 1.8.1
- 包括所有 Blynk/ESP 库并安装 ESP8266 作为板(通用)
- 将空草图上传到 Arduino
- 与 Arduino/ESP 之间的连接如下。http://www.teomaragakis.com/hardware/electronics/how-to-connect-an-esp8266-to-an-arduino-uno/(我知道关于 3.3V 到 5V 的问题,但似乎到目前为止工作)
好的,第一个问题是我无法按照教程中所述刷新 ESP 的固件(从 Sunfounder 获得)。下载最新固件并用 ESP8266Flasher 刷机。
其他问题是当我尝试编译第一个教程中的代码时,我总是得到错误:
C:\Users\Chris\Documents\Arduino\libraries\Blynk\examples\Boards_WiFi\ESP8266_Shield\ESP8266_Shield.ino:5:21: fatal error: ESP8266.h: No such file or directory
如前所述,我已经安装了所有库。实在是想不出来要做的事情了。任何帮助将非常感激。来自柏林的问候,克里斯。要关闭我尝试上传到开发板的代码(Arduino Board 或通用 ESP8266 都不起作用)
//#define BLYNK_DEBUG
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266.h>
#include <BlynkSimpleShieldEsp8266.h>
// Set ESP8266 Serial object
#define EspSerial Serial
ESP8266 wifi(EspSerial);
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "???";
void setup()
{
Serial.begin(115200); // Set console baud rate
delay(10);
EspSerial.begin(115200); // Set ESP8266 baud rate
delay(10);
Blynk.begin(auth, wifi, "???",
"???");
}
void loop()
{
Blynk.run();
}
这 ???我换了我的令牌和数据。