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

Avatar

Please consider registering
Guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —






— Match —





— Forum Options —





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

sp_Feed sp_TopicIcon
esp8266 missed events on thingspeak
No permission to create posts
April 12, 2016
1:14 pm
Avatar
disha
New Member
Members
Forum Posts: 4
Member Since:
April 12, 2016
sp_UserOfflineSmall Offline

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

April 13, 2016
10:44 am
Avatar
Hans
Natick, MA

Admin
Forum Posts: 396
Member Since:
January 18, 2011
sp_UserOfflineSmall Offline

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.

April 17, 2016
3:39 am
Avatar
disha
New Member
Members
Forum Posts: 4
Member Since:
April 12, 2016
sp_UserOfflineSmall Offline

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

April 17, 2016
4:12 am
Avatar
disha
New Member
Members
Forum Posts: 4
Member Since:
April 12, 2016
sp_UserOfflineSmall Offline

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:
22 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

BarryMaync, ThomasRougs, DonaldGen, prince, JrGordon, Elamsweems

Administrators: Hans: 387, lee: 457