Tag Archives: wifi

Send data to Thinkspeak with ESP8266 by AT command

Published by:

In this experiment, by using AT commands we tried to connect our ESP8266 to Wi-fi, then send a data to Thingspeak.com website.

+ 

  • On Thingspeak website:

 

  • Read the 1st report and make the wiring as explained in that report.
  • Us following AT commands to connect to Thinkspeak
    • AT+CIPSTART=”TCP”,”api.thingspeak.com”,80
    • AT+CIPSEND=51
    • GET /update?key=YOUR_ API_Key&field1=YOUR_DATA_like_100 \r\n
    • AT+CIPCLOSE

Note:

AT+CIPSTART commands starts a TCP or UDP connection.

Parameters
– 0..7 – Connection number
– “TCP” or “UDP”
– Remote server IP address
– Remote server port
– remote domain name

AT+CIPSEND AT command is used to send the data over the TCP or UDP connection.

Usage:
AT+CIPSEND? = This returns the data length sent at a time

AT+CIPCLOSE AT command closes the TCP or UDP connection. It can be configured for slow close or quick close. When there are multi-IP connections, a connection number is also required.

 

 

Congratulations! You send data to Thinkspeak.