I'm currently using an arduino uno R3, IO expansion shield v7, and ESP8266 Wifi bee (ESP8266 Wifi Bee (Arduino Compatible) - DFRobot) to pass data in thingspeak. It send data in thingspeak but doesn't send per second, most of the time it send on 8 seconds interval.
#include "esp8266.h"
#include "SoftwareSerial.h"
#define ssid "acer Liquid Z530"
#define password "12344321"
#define serverIP "184.106.153.149"
#define serverPort "80"
String msg = "GET /update?key=PTBOO0CTH2ERQRD8&field1=1&field2=10&field3=10\r\n";
Esp8266 wifi;
SoftwareSerial mySerial(10, 11);
void setup() {
delay(2000); // it will be better to delay 2s to wait esp8266 module OK
Serial.begin(115200);
mySerial.begin(115200);
wifi.begin(&Serial, &mySerial); //Serial is used to communicate with esp8266 module, mySerial is used to debug
if (wifi.checkEsp8266()) {
wifi.debugPrintln("esp8266 is online!");
}
if (wifi.connectAP(ssid, password)) {
wifi.debugPrintln("esp8266 is connected to AP!");
}
if (wifi.setSingleConnect()) {
wifi.debugPrintln("single connect!");
}
wifi.debugPrintln(wifi.getIP());
}
void loop() {
if (wifi.connectTCPServer(serverIP, serverPort)) {
wifi.debugPrintln("connect TCP server OK!");
}
wifi.sendMessage(msg);
delay(1000);
}