Description
I have tried to implement the HttpUpdate Example albeit it with a few changes. Here is my sketch:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
- httpUpdate.ino
* - Created on: 27.11.2015
*/
include "Arduino.h"
include "ESP8266WiFi.h"
include "ESP8266HTTPClient.h"
include "ESP8266httpUpdate.h"
const char* ssid = "ssid";
const char* password = "password";
void setup()
{
// put your setup code here, to run once:
Serial.begin(115200);
delay(100);
// We start by connecting to a WiFi network
Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
delay(500);
}
void loop()
{
t_httpUpdate_return ret = ESPhttpUpdate.update("https://rawgit.com/Zyxmn/esp8266_BlinkyBin/master/Blinky.cpp.bin");
delay(500);
switch(ret) {
case HTTP_UPDATE_FAILED:
Serial.printf("HTTP_UPDATE_FAILD Error (%d): %s", ESPhttpUpdate.getLastError(), ESPhttpUpdate.getLastErrorString().c_str());
Serial.println();
Serial.println();
Serial.println();
break;
case HTTP_UPDATE_NO_UPDATES:
Serial.println("HTTP_UPDATE_NO_UPDATES");
Serial.println();
Serial.println();
break;
case HTTP_UPDATE_OK:
Serial.println("HTTP_UPDATE_OK");
Serial.println();
Serial.println();
Serial.println();
break;
}
delay(500);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
I get the wrong http code error as mentioned in the title, I tried looking online but could not find anything useful. I was wondering if anyone can help me figure out how to resolve it.
Thanks a lot in advance fellas! Appreciate the help.