Esp8266


#1

I see in GitHub there is code for the ESP8266 either integrated or used externally, but it doesn’t seem to be a supported shield.

Are you guys still working out some issues?

Cheers,

Craig


How to set up node mcu d1 mini in project
Please make support for Arudino Uno WiFi
Esp8266-01 as wifi shield
#2

This is something really good to be added :wink:


#3

SSL even. Woot.


ESP8266 module and Arduino UNO
#4

@kreggly @m3mn0t Hey guys! So the code should actually work on the ESP8266.

The reason it isn’t yet a supported shield is because we haven’t had bandwidth to test so we kept scope contained to Arduino for now.

-B


#5

@kreggly pm me the link to github please :wink:


#6

Well I’ll test it once my parts come in. Sweet.

Makes for a nice tight wireless sensor module!


#7

Actually i’m finishing a project using couple ESP8266. I would like to share on hackster.io/Cayenne/projects but…

Regards,

André


#8

It’s part of the how to in the docs section.

Look what came in the mail today? -07 version. I have the -12 version coming soon too.

I’ll wire this up to a pro mini and have a super compact battery powered sensor.

Then see what can be done about an esp8266 only solution :stuck_out_tongue:


#9

Turns out I didn’t need the pro-mini. Just needed some Arduino library magic and figuring out the programming modes on the ESP.


#10

Awesome! Any way you can post some pics and maybe a quick and dirty ‘how-to’? My guess is many others will want to do similar to what you’ve done.

I’ll see if we can’t get the official support for ESP-8266 out the door too :slight_smile:

-B


#11

Hi
Will be supported all ESP modules (ESP-12, ESP-12e, ESP-07, …)?
T


#12

@kreggly

What he said! No pressure :slight_smile:.

I have a couple 8266 breakout boards here that need to be put to use.
-Ian


#13

That’s the plan, yes. Once we start testing and getting deeper into ESP then we’ll know if there are limitations/difficulties that would cause us to not support a specific model.

-B


#14

Almost all ESP modules are the same, it’s almost a marketing gimmick. The obvious differences are the ESP-01 has limited GPIO pins and the 12-e has more memory. I’m about to sit down for an ESP session right now, I’ll post back if I can get it on the dashboard.


#15

Good luck!

Let us know what you find.

Ian


#16

See @kreggly’s post below


Dashboard values don't update
8266 V-pin Cmd error/Login timeout
Dog treat dispenser!
#17

thanks Adam!

Ian


#18

Forgot to attach the file in my last post :confused:


#19

Also just noticed you can change the device name in the device settings, so if the name of the Arduino you picked is bugging you just rename it to ESP8266


#20

So my HowTo in a nutshell.

I bought ESP8266-07 modules from AliExpress for a whole $2 each shipped. http://www.aliexpress.com/item/1pcs-lot-ESP8266-serial-WIFI-model-ESP-07-Authenticity-Guaranteed/32310095382.html

To use them, you must provide a 3.3V supply between VCC and GND, attach the EN pin to VCC, and GPIO15 to GND.

To program, you must pull GPIO0 low, and momenterally put RST low to get into flashing mode.

You should also have an FTDI RS232-3V3 cable or some other USB to Serial converter with 3.3V logic.

Wire up the RX to TX and TX to RX plus GND from the RS232 cable to your ESP8266. If you have 3.3V on there, you can use it to power up your ESP, but I recommend an external supply with your programming jumpers.

Now download the Arduino software, and drop this in the additional boards field under preferences. http://arduino.esp8266.com/stable/package_esp8266com_index.json.

After doing this, if you go under tools, board manager, there will be an option to install the esp8266 stuff. This will allow you to select the ESP8266 as a programming target and program it like an Arduino. Aces!!

Now select the Generic ESP8266 with 64K SPIFFS and 115200 baud.

To check that you’ve selected the correct Open the Serial monitor, set it to 74880, as this is what my ESP8266-07 defaults to, and tap the reset low, or toggle the EN pin. You should see some bootloader text.

Now, I recommend you flash this sketch:

//Note that for the  ESP-07, the blue led is on GPIO2

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin 2 as an output.
  pinMode(2, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(2, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);              // wait for a second
  digitalWrite(2, LOW);    // turn the LED off by making the voltage LOW
  delay(2000);              // wait for a second
}

This will flash the blue led. Compile for ESP8266, and upload. If you have issues, remember that GPIO15, and GPIO0 must be low during programming, EN high, and you need to pull RST low momentarily to get the right mode.

If your blue LED is flashing (you might need to reset again. remove the jumper low to GPIO0), you have success.

Now go into the dashboard and create, as @ats1080s says, ANY arduino device, copy and paste your token, ssid, and password into this sketch:

#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[] = "<your_token>";
// Your network name and password.
char ssid[] = "<your_ssid>";
char password[] = "<your_pwd>";

void setup()
{
  // initialize digital pin 2 as an output.
  pinMode(2, OUTPUT);
  Serial.begin(9600);
  Cayenne.begin(token, ssid, password);
}

void loop()
{
  Cayenne.run();
}

// This function will be called every time a Dashboard widget writes a value to Virtual Pin 2.
CAYENNE_IN(V2)
{
  CAYENNE_LOG("Got a value: %s", getValue.asStr());
  int i = getValue.asInt();
  
  if (i == 0)
  {
    digitalWrite(2, LOW);
  }
  else
  {
    digitalWrite(2, HIGH);
  }  
}

After resetting, you can go into the serial monitor. It should now show you stuff at 9600 baud. Watch it connect to your network and the dashboard.

Now add a virtual button 2, to turn your LED on and off, or just use the digital 2.

And that’s all there is too it.

Cheers,

Craig


ESP8266 Connection in Cayenne!
How to use cayenne with esp-12/esp8266 module
Esp8266 wifi on aurdino nano
Is ENC28J60 supported
NRF24l01+ wireless module
Arduino+ESP8266+Android
Battery Powered ESP8266 Temperature/Humidity Monitor with DHT11
An emerging popular WiFi shield ESP8266
Connecting CC3000 - Adafruit to Cayenne
Need help connecting to Cayenne with ESP8266
Help with my sketch
Sparkfun Esp8266 thing dev board & relays
What's New? What's Happening? Hey, how are you?
Not connecting arduino uno ESP8226 with cayenne
Trigger will not work - esp8266
How to set up node mcu d1 mini in project
Connect Cayenne with Esp32 in Arduino IDE
Connecting CC3000 - Adafruit to Cayenne
LinkNode R4 (ESP8266-12F) WDT reset loop when Cayenne sketch loaded
Support wemos D1 mini
Nodemcu connection issue
Trigger Troubleshooting
Cannot get uno wifi set up with Cayenne
Customization & queries