UNO with ESP8266 Problems

I am trying to connect to Cayenne with an UNO and ESP8266-01. The code I am using complies but I get an erroe when uploading, The code

// This example shows how to connect to Cayenne using an ESP8266 and send/receive sample data.
// Make sure you install the ESP8266 Board Package via the Arduino IDE Board Manager and select the correct ESP8266 board before compiling. 

//#define CAYENNE_DEBUG
#define CAYENNE_PRINT Serial
#include <CayenneMQTTESP8266.h>

// WiFi network info.
char ssid[] = "xxxxxx";
char wifiPassword[] = "xxxxxx";

// Cayenne authentication info. This should be obtained from the Cayenne Dashboard.
char username[] = "";
char password[] = "";
char clientID[] = "";

unsigned long lastMillis = 0;

void setup() {
	Serial.begin(9600);
	Cayenne.begin(username, password, clientID, ssid, wifiPassword);
}

void loop() {
	Cayenne.loop();

	//Publish data every 10 seconds (10000 milliseconds). Change this value to publish at a different interval.
	if (millis() - lastMillis > 10000) {
		lastMillis = millis();
		//Write data to Cayenne here. This example just sends the current uptime in milliseconds.
		Cayenne.virtualWrite(0, lastMillis);
		//Some examples of other functions you can use to send data.
		//Cayenne.celsiusWrite(1, 22.0);
		//Cayenne.luxWrite(2, 700);
		//Cayenne.virtualWrite(3, 50, TYPE_PROXIMITY, UNIT_CENTIMETER);
	}
}

//Default function for processing actuator commands from the Cayenne Dashboard.
//You can also use functions for specific channels, e.g CAYENNE_IN(1) for channel 1 commands.
CAYENNE_IN_DEFAULT()
{
	CAYENNE_LOG("CAYENNE_IN_DEFAULT(%u) - %s, %s", request.channel, getValue.getId(), getValue.asString());
	//Process message here. If there is an error set an error message using getValue.setError(), e.g getValue.setError("Error message");
}

The error I get is

Archiving built core (caching) in: C:\Users\R\AppData\Local\Temp\arduino_cache_70597\core\core_esp8266_esp8266_generic_CpuFrequency_80,FlashFreq_40,FlashMode_dio,UploadSpeed_115200,FlashSize_512K64,ResetMethod_ck,Debug_Disabled,DebugLevel_None_____d3139fbfea7204bd3f0bbff37cf12d28.a
Sketch uses 240889 bytes (55%) of program storage space. Maximum is 434160 bytes.
Global variables use 33576 bytes (40%) of dynamic memory, leaving 48344 bytes for local variables. Maximum is 81920 bytes.
warning: espcomm_sync failed

@self.raymond to connect esp8266 as shield follow this: Cayenne-MQTT-Arduino/ESP8266Shield.ino at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub

Yes that the code i ran and got the error.

I am looking for a tutorial setting up an esp8266 01 to use as a wifi connector for my Arduino Uno. It seems I am not the only one with this problem. Has anyone harness this wifi chip for an UNO. Thanks for the help

Sprinkfitter

the code you gave above is different from the code for esp8266 as shield

Thanks I will try this code. I am going to flash the esp8266 01 in hopes
this will help. I wish there was a complete detail tutorial from flashing
esp8266 to uploading data to Cayenne.with the arduino.

1 Like

Any luck @self.raymond?