Hi,
While trying to upload my code to my ESP module, I am getting these errors:
Archiving built core (caching) in: C:\Users\RyanB96\AppData\Local\Temp\arduino_cache_254861\core\core_esp8266_esp8266_nodemcu_CpuFrequency_80,UploadSpeed_115200,FlashSize_4M3M_d3b6212c6c4266333fad19039a8b346d.a
Sketch uses 248857 bytes (23%) of program storage space. Maximum is 1044464 bytes.
Global variables use 33848 bytes (41%) of dynamic memory, leaving 48072 bytes for local variables. Maximum is 81920 bytes.
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
error: failed sending 0xC0
error: failed sending 8 bytes
error: failed sending 36 bytes
error: failed sending 0xC0
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed
Does anyone have any ideas?
Here is my code:
//----------------------------------------------
//
// Sketch Generated by Visuino
// www.visuino.com
// Version 7.8.2.228
//
//------------------ Source --------------------
//
// ESP Modules Setup.owarduino
//
//----------------------------------------------
#define VISUINO_ESP8266
#include <OpenWire.h>
#include <Mitov.h>
#include <ESP8266WiFi.h>
#include <Mitov_ESP8266_WiFi.h>
#include <Ethernet.h>
#include <SPI.h>
#include <Mitov_FormattedSerial.h>
#include <Mitov_GPS.h>
#include <Mitov_Text.h>
#include <Mitov_Timing.h>
// Arduino Board Declarations
namespace BoardDeclarations
{
Mitov::TypedSerialPort<Mitov::SerialPort<SERIAL_TYPE, Serial>, SERIAL_TYPE, Serial> SerialPort0;
Mitov::ArduinoSerialOutput<Mitov::TypedSerialPort<Mitov::SerialPort<SERIAL_TYPE, Serial>, SERIAL_TYPE, Serial>, SerialPort0> SerialOutput0;
} // BoardDeclarations
// Declarations
namespace Declarations
{
Mitov::ESP8266WiFiModule TArduinoESP8266WiFiModule1;
Mitov::ESP8266ModuleRemoteAccessPoint TArduinoESP8266WiFiModuleRemoteAccessPoint1( Declarations::TArduinoESP8266WiFiModule1 );
Mitov::TCPServerSocket<Mitov::ESP8266WiFiModule, Declarations::TArduinoESP8266WiFiModule1, WiFiServer, WiFiClient> TArduinoWiFiTCPServerSocket1;
Mitov::EthernetSocketStringInput<Mitov::TCPServerSocket<Mitov::ESP8266WiFiModule, Declarations::TArduinoESP8266WiFiModule1, WiFiServer, WiFiClient>, Declarations::TArduinoWiFiTCPServerSocket1> TArduinoWiFiTCPServerSocket1_SerialInputString_1;
Mitov::MitovSerialGPS GPS1;
Mitov::FormattedText_Fixed FormattedText1;
Mitov::FormattedTextElementAnalog TArduinoFormattedTextElementAnalog1( Declarations::FormattedText1 );
Mitov::FormattedTextElementAnalog TArduinoFormattedTextElementAnalog2( Declarations::FormattedText1 );
Mitov::Delay Delay1;
} // Declarations
// Type Converters
namespace TypeConverters
{
Mitov::Convert_BinaryToClock Converter0;
} // TypeConverters
// Pin Call Declarations
namespace PinCalls
{
void PinCallerReceive1( void *_Data );
void PinCallerReceive2( void *_Data );
void PinCallerReceive3( void *_Data );
void PinCallerReceive4( void *_Data );
void PinCallerReceive5( void *_Data );
void PinCallerReceive6( void *_Data );
void PinCallerReceive7( void *_Data );
} // PinCalls
// Pin Call Implementations
namespace PinCalls
{
void PinCallerReceive2( void *_Data )
{
TypeConverters::Converter0.Convert( _Data, PinCallerReceive1 );
}
void PinCallerReceive1( void *_Data )
{
Declarations::FormattedText1.ClockInputPin_o_Receive( _Data );
}
void PinCallerReceive3( void *_Data )
{
Declarations::GPS1._DirectPinReceive( _Data );
}
void PinCallerReceive4( void *_Data )
{
Declarations::TArduinoFormattedTextElementAnalog1.InputPin_o_Receive( _Data );
}
void PinCallerReceive5( void *_Data )
{
Declarations::TArduinoFormattedTextElementAnalog2.InputPin_o_Receive( _Data );
}
void PinCallerReceive6( void *_Data )
{
Declarations::TArduinoWiFiTCPServerSocket1_SerialInputString_1.InputPin_o_Receive( _Data );
Declarations::Delay1.StartInputPin_o_Receive( _Data );
}
void PinCallerReceive7( void *_Data )
{
Declarations::TArduinoWiFiTCPServerSocket1.DisconnectInputPin_o_Receive( _Data );
}
} // PinCalls
namespace ComponentsHardware
{
void SystemUpdateHardware()
{
}
} // ComponentsHardware
//The setup function is called once at startup of the sketch
void setup()
{
Declarations::FormattedText1.ClockInputPin_o_IsConnected = true;
Declarations::TArduinoESP8266WiFiModule1.AccessPoint.SSID = "ryan's iphone";
Declarations::TArduinoESP8266WiFiModule1.AccessPoint.Password = "ryanwifi";
Declarations::TArduinoESP8266WiFiModule1.HostName = "gpsserver";
Declarations::TArduinoWiFiTCPServerSocket1.ConnectedOutputPin.SetCallback( PinCalls::PinCallerReceive2 );
BoardDeclarations::SerialOutput0.OutputPin.SetCallback( PinCalls::PinCallerReceive3 );
Declarations::GPS1.LocationOutputPins[ 0 ].SetCallback( PinCalls::PinCallerReceive4 );
Declarations::GPS1.LocationOutputPins[ 1 ].SetCallback( PinCalls::PinCallerReceive5 );
Declarations::FormattedText1.OutputPin.SetCallback( PinCalls::PinCallerReceive6 );
Declarations::FormattedText1.AddReadyElement( (char *)"HTTP/1.1.200 OK \r\nContent-Type: text/html\r\nConnection: close\r\nRefresh: 5\r\n\r\n<!DOCTYPE html>\r\n<html> \r\n<head> \r\n<script type = \"text/javascript\" src=\"http://maps.google.com/maps/api/js?sensor=false\">\r\n</script>\r\n</head>\r\n<body> \r\n<div id=\"map\" style = \"width:800px;height 600px\"></div>\r\n\r\n<script type=\"text/javascript\">\r\nvar myLatLng = {lat: ", 0 );
Declarations::FormattedText1.AddReadyElement( (char *)", lng: ", 1 );
Declarations::FormattedText1.AddNullElement( "};\r\nvar myOptions = {\r\nzoom : 19,\r\ncenter: myLatLng,\r\nmapTypeId: google.maps.MapTypeId.HYBRID\r\n};\r\n\r\nvar map = new google.maps.Map(document.getElementId(\"map\"),myOptions);\r\nvar marker = new google.maps.Marker ({\r\nposition: myLatLng,\r\nmap: map, \r\ntitle: \"My ESP8266 GPS\"\r\n});\r\n\r\n</script>\r\n</body>\r\n</html> " );
Declarations::Delay1.OutputPin.SetCallback( PinCalls::PinCallerReceive7 );
Declarations::TArduinoESP8266WiFiModule1.SystemInit();
Declarations::TArduinoWiFiTCPServerSocket1.SystemInit();
BoardDeclarations::SerialPort0.SystemInit();
Declarations::FormattedText1.SystemStart();
Declarations::TArduinoFormattedTextElementAnalog1.SystemStart();
Declarations::TArduinoFormattedTextElementAnalog2.SystemStart();
}
// The loop function is called in an endless loop
void loop()
{
unsigned long A_Current_Microseconds = micros();
BoardDeclarations::SerialOutput0.SystemLoopBegin( A_Current_Microseconds );
Declarations::TArduinoWiFiTCPServerSocket1.SystemLoopBegin( A_Current_Microseconds );
BoardDeclarations::SerialPort0.SystemLoopBegin( A_Current_Microseconds );
Declarations::Delay1.SystemLoopBegin( A_Current_Microseconds );
Declarations::FormattedText1.SystemLoopEnd( A_Current_Microseconds );
}
