esp8266 missed events on thingspeak | ESP8266 Wi-Fi Module | Forum

Avatar

Please consider registering
Guest

Search

— Forum Scope —






— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

Register Lost password?
sp_Feed sp_TopicIcon
esp8266 missed events on thingspeak
Avatar
disha
New Member
Forum Posts: 4
sp_UserOfflineSmall Offline
1
April 12, 2016 - 1:14 pm
sp_Permalink sp_Print

I am trying to display value on thingspeak  and per image below we can see that number of entries are :22 and points plotted are just 3.

And every time to see the data plot i need to refresh the page to get updated plot.

I dont think so code has anything to do with this but, how can solve this?

http://cdn.instructables.com/F2M/BA50/IMRYGF7H/F2MBA50IMRYGF7H.LARGE.jpg

Avatar
Hans
Natick, MA

Forum Posts: 390
sp_UserOfflineSmall Offline
2
April 13, 2016 - 10:44 am
sp_Permalink sp_Print

If you click the edit icon (pencil), you will see the chart options. If you are only showing the last day of day you might only see the last few points. If you are showing, results = 60 then you should see all of the most recent results. Also, set dynamic to true to get the charts to update themselves.

Avatar
disha
New Member
Forum Posts: 4
sp_UserOfflineSmall Offline
3
April 17, 2016 - 3:39 am
sp_Permalink sp_Print

Hans said
If you click the edit icon (pencil), you will see the chart options. If you are only showing the last day of day you might only see the last few points. If you are showing, results = 60 then you should see all of the most recent results. Also, set dynamic to true to get the charts to update themselves.

Ya i did that and you can see two pics below the field chart settings changed and then another of: plot image where 45 entries and you can see only one point on the plot

https://drive.google.com/open?id=0B9S6uuNt7m4OMHV3aTJFMVRfdDQ

https://drive.google.com/open?id=0B9S6uuNt7m4OOUVHRERrMjVHTUU

Avatar
disha
New Member
Forum Posts: 4
sp_UserOfflineSmall Offline
4
April 17, 2016 - 4:12 am
sp_Permalink sp_Print

My code:

#include <SoftwareSerial.h>
#include <stdlib.h>
SoftwareSerial ser(2,3); // RX, TX
int ledpin=13;
int sense=A0;
float volt=0.0;
String apiKey="PT41QR66HL1NH8LU";
// this runs once
void setup() {                
  // initialize the digital pin as an output.
  pinMode(ledpin, OUTPUT);    

  // enable debug serial
  Serial.begin(9600);
  // enable software serial
  ser.begin(9600);
 
  // reset ESP8266
ser.println("AT+RST");
}
void loop()
{
   digitalWrite(ledpin, HIGH);   
  delay(500);               
  digitalWrite(ledpin, LOW);
    delay(500);  
    volt=analogRead(sense)*(5.0f/1023.0f);
  char buf[16];
  String strvolt1 = dtostrf(volt, 4, 1, buf);
 
  Serial.println(strvolt1);
   
    String cmd = "AT+CIPSTART=\"TCP\",\"";
  cmd += "184.106.153.149"; // api.thingspeak.com
  cmd += "\",80";
  ser.println(cmd);
   
  if(ser.find("Error")){
    Serial.println("AT+CIPSTART error");
    return;
  }
  String getStr = "GET /update?api_key=";
  getStr += apiKey;
  getStr +="&field1=";
  getStr += String(strvolt1);
  getStr += "

";
  cmd = "AT+CIPSEND=";
  cmd += String(getStr.length());
  ser.println(cmd);

  if(ser.find(">")){
    ser.print(getStr);
  }
  else{
    ser.println("AT+CIPCLOSE");
    // alert user
    Serial.println("AT+CIPCLOSE");
  }
    delay(16000);  
}

Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
26 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 252

Vinod: 164

cstapels: 96

piajola: 75

vespapierre: 63

Adarsh_Murthy: 59

Newest Members:

candacele1

WilliamBer

roxieob18

Metawatch

ozayagw

ubabeutiti

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

 

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Administrators: Hans, lee