2017-02-09 373 views
3

所以我今天拿到了Arduino Uno。對於一個項目,我希望能夠通過Wifi控制我的Arduino上的一些繼電器(通過Blynk應用程序)。爲此,我想使用ESP8266-01作爲Wifi屏蔽。將Arduino連接到Blynk與ESP8266

我用這個教程:https://create.arduino.cc/projecthub/nolan-mathews/connect-to-blynk-using-esp8266-as-arduino-uno-wifi-shield-m1-46a453

唯一的區別是我使用的是Win10。以下是我的了:

好了,第一個問題是我不能閃了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 

至於說我已經安裝的所有庫。不能真正想到要做的事情了。任何幫助將非常感激。來自柏林的最好的問候,Chris。 要關閉我試着上傳到板代碼(包括Arduino板或通用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(); 
} 

的???我轉換了我的令牌和數據。

回答

3

嘗試修改此

#include <ESP8266.h> 

這個

#include <ESP8266_Lib.h> 

的文件中this commit改名。

+0

謝謝,這工作。現在我有一些新的錯誤,但至少有一些可以玩的東西。似乎在我閃過ESP時出現錯誤。現在不能讀出Arduino IDE中的串口管理器=) –