Esp8266

Just wanted to drop a quick note…have my esp’s up and talking…happy days!
:joy:

1 Like

Woot! Let me know if you integrated the ESP power saving modes.

Optimizing at a later date…I/O and data logging as first step. Had a few issues with libraries, but sorted that out.

ESP are kicking out good temp data from ds18b20

2 Likes

Now if you could just go ahead and add OTA programming and sleep mode that
would be great :wink:

One step at a time…:grin:

Looks good!

I have a ESP, Arduino,DHT11 and some relays.
I’m trying to put it all to work in cayenne …
it’s been one month, trying to compile and run to activate my ESP8266.
unsuccessfully. :sob:

1 Like

Have you made the adjustments to the library that Adam explains here-

If you did a couple weeks ago, keep in mind the library was updated and any changes you made in the past were lost. I spent 4 hours last night figuring out the same problem.

-Ian

Oh, and welcome to the group!

Thanks @Ian !!

I will make these changes and post the results.

You actually shouldn’t need to make those changes, should work fine without it. Use kreggly’s guide up above (So my HowTo in a nutshell.). Are you getting any errors in the serial output? What isn’t working?

Adam,
As I said I had great difficulty last night until I remembered 2 things- 1. That I had made changes to the library and 2. That the libraries had recently been updated. When I made the same change to the new library everything worked fine.

Up to that point I could load the sketch but it would not run, sometimes just hanging other times perpetually rebooting.

So now you tell me that shouldn’t work, but it did?

I can try it again when I get home.

-Ian

Ian,

Instead of modifying libraries, just use these includes in your sketch for ESP8266 native compilation as outlined in the HowTo:

#include "CayenneDefines.h"
#include "BlynkSimpleEsp8266.h"
#include "CayenneWiFiClient.h"

You won’t need to modify the libraries anymore and be a very happy Ian.

Craig

4 Likes

It will still work fine, but modifying libraries should be a last resort since as you noticed on an update everything gets wiped out. @kreggly’s guide should work fine (it did for me anyway)

It looks like Cayenne just took Blynk libraries, so yes in Blynk they already have both “ESP8266 as a shield” and “ESP8266 standalone” options, and also SSL security (I’m very concerned about security.)
Looks like Cayenne is not capable with this yet.
Anyway maybe Blynk http://www.blynk.cc/ works for you. I’m running 4 different projects on ESP8266 currently :wink:

Ha, that ain’t gonna happen.

Whaaaat?!? Loading libraries in a sketch??? What are you smokin’?
Um, ya sometimes the obvious is a little more than I can handle. Remember there are reasons why I’m not a code guy.

Cog, I tried Blynk and things just didn’t mesh for me, also been on three or four other platforms but I’ve settled in here and I’m having pretty good luck and guys like Adam and Craig have taken me under their wings as the poor lost soul that I am. Thanks for the recommendation though, variety is the spice of life.

@jhonathan.lhp
Be sure to read the follow up from my post. Smarter people have spoken. Good luck, and let us know how things go.

Thanks everyone! I need all the help I can get.

-Ian

1 Like

Amateur PCB guy, or professional?

Just using Eagle, or do you have a tool set with design rule checking?

I am always on the lookout for decent layout guys, as I want to get back to hardware development as applied to alternate energy, etc.

I have designed hundreds of products, but prefer to just farm out the layout stuff to more artsy people. I prefer code and schematics and the elegance of integration. I get too caught up in perfecting PCB designs when I do it.

Perhaps a collaboration?

Craig

ps. This reminds me. My last PCB was an insulin strip simulator with a precision reference, a 16 bit ADC and a 16 bit DAC. There were 6 layers in the width of an insulin test strip! That is small.

My Code

**#define CAYENNE_DEBUG         // Uncomment to show debug messages**
**#define CAYENNE_PRINT Serial  // Comment this out to disable prints and save space**
**#include "CayenneDefines.h"**
**#include "BlynkSimpleEsp8266.h"**
**#include "CayenneWiFiClient.h"**

**// Cayenne authentication token. This should be obtained from the Cayenne Dashboard.**
**char token[] = "mytoken";**
**// Your network name and password.**
**char ssid[] = "mynet";**
**char password[] = "mypass";**

**void setup()**
**{**
**  Serial.begin(9600);**
**  Cayenne.begin(token, ssid, password);**
**}**

**void loop()**
**{**
**  Cayenne.run();**
**}**
**"**
**Error Messages.**
**"Arduino: 1.6.9 (Windows 10), Board: "Arduino/Genuino Uno"**

**C:\Users\Jhonathan\Documents\Arduino\libraries\Cayenne/BlynkSimpleEsp8266.h:15:2: error: #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.**

** #error This code is intended to run on the ESP8266 platform! Please check your Tools->Board setting.**

**  ^**

**In file included from C:\Users\Jhonathan\Documents\Arduino\sketch_jul26a\sketch_jul26a.ino:4:0:**

**C:\Users\Jhonathan\Documents\Arduino\libraries\Cayenne/BlynkSimpleEsp8266.h:25:25: fatal error: ESP8266WiFi.h: No such file or directory**

** #include <ESP8266WiFi.h>**

**                         ^**
**compilation terminated.**

**exit status 1**
**Error compiling for board Arduino/Genuino Uno.**




**"**

It’s telling you what’s wrong. Google “How to Program ESP8266 modules with the Arduino IDE”.

What module variant are you using?

Craig

1 Like

“Esp8266 Esp-01”

Got it.
I need program my ESP first.
i will test blink.cc too.

You can use the tutorial above Esp8266 - #20 by kreggly, only there is no GPIO15 and GPIO02 to worry about on your version.

Do you have a USB to RS232 cable?

Craig