I can’t get the ESP to send any temp to the dashboard in any virtual pin. I even tried to emulate using Cayenne.fahrenheitWrite(10, 74.97); and it just never makes it to the dashboard. But anyway, I can confirm that the code is reading the correct temp by printing it to the serial port. Must be a bug in the code.


Assuming you have debug on- are you seeing the vr# (read) and vw# (write) commands. At least that’s what I think they are.


Craig, I wasn’t using your code, just learning from it :+1: . I’m using the code I cobbled together using the Adafruit and Cayenne examples. I think I’m getting closer to something that works.

I’m back at work tomorrow, so I won’t have much time to play again until next weekend, good night all.



Note, I am using the ESP8266 ADC input, and have it reading using a direct read of the analog pin through Cayenne, as well as using a virtual pin where I do a median filter and convert to volts.

Something to note - In Cayenne, you need to read from the 3rd analog channel even though the channel is A0 in the Arduino sketch.

Also note, that for the ESP-07 at least, the ADC goes full scale from 0-3.3V. Woot. I’ve heard the ESP-01 only goes to 1. Mine goes to 3.3…

Also just received some ESP-12F modules. Will probably wire them up on the weekend.




Here is my median filter, if anyone cares to use it. Note that you don’t want thousands of measurements, but if you get the occasional glitch, this will cure your problem.

For fast changing measurements, you don’t want to use this.

  float m = MedianRead(A0);

  //convert to voltage
  m = 3.3 * m / 1024.0;
  Cayenne.virtualWrite(V0, m);

//define how many measurements to make
#define MAX_BUF 11

int MedianRead(int chan) 
   int buffer[MAX_BUF]; 
   int i, j; 
   int temp; 

   //get some data
   for (i=0; i<MAX_BUF; i++) 
     buffer[i] = analogRead(chan);
   //sort em
   for (j=0; j<MAX_BUF-1; j++) 
     for (i=0; i<MAX_BUF-1- j;i++)
       if (buffer[i]>buffer[i+1])
         temp = buffer[i]; 
         buffer[i+1] = temp; 

   //return the one in the middle
   return buffer[(MAX_BUF-1)/2];



Best Practice for Spurious Censor Readings?
When or if is the Android App going to support arduino

What version flash eap8266 for make it run?

Make it simple esp8266
Home Automation Project

NodeMCU. You can get a current build here just select the options you need.


The Arduino IDE and ESP library don’t need the Node MCU stuff, you are writing the flash through the bootloader with your own program.



Hmm I didn’t know that. I assumed the Arduino IDE used NodeMCU to boot and and then runs the code you upload. Looks like NodeMCU is only for LUA scripts.


The way I understand it, and I could be wrong, is that NodeMCU is just another flash image, like you would create with Arduino.

Those WeMos thingies are pretty cool. I tried making a power supply with a CR2032, but the current kicks in the CR2032 current protection. My guess is it is some sort of polyfuse technology. I had to build a fixture to discharge the batteries before disposal because of this effect.



But i flash it before…


From -

While the HUZZAH ESP8266 breakout comes pre-programmed with NodeMCU’s Lua interpretter, you don’t have to use it! Instead, you can use the Arduino IDE which may be more familar. This will write directly to the firmware, erasing the NodeMCU firmware, so if you want to go back to Lua, use the flasher to re-install it.


My esp8266-01, isnt model in adafruit…:joy::joy::joy::joy:


It doesn’t matter what model your ESP is, the Arduino IDE will flash what it needs to run the program.

Doing some more reading it looks like the Arduino IDE uses nodeMCU but it flashes the parts it needs and overwrites any current firmware that is on it, so it doesn’t matter what you have on it to begin with.


Ok , thx 4 ure attention…oops what this is make ashare project via videos? :sunglasses:


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


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

ESP8266-01 with DS18d20

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