ARDUINO -> ESP8266 WIFI Module -> IoT platform
###ESP8266 pinout
###How to use
For use this example just insert your ssid and password into the define's, on the top of the sketch. Then create an account into thingspeak.com, copy your api key and put into the sketch GET variable.
###AT commands used in this example
FUNCTION | AT command | Response |
---|---|---|
WiFi Mode | ||
AT+CWMODE=1 | STA | |
AT+CWMODE=2 | AP | |
AT+CWMODE=3 | BOTH | |
Join Access Point | ||
AT+CWJAP="SSID","Password" |
FUNCTION | AT command | Response |
---|---|---|
Set up TCP or UDP connection | ||
(CIPMUX=0) AT+CIPSTART =type,addr,port; (CIPMUX=1) AT+CIPSTART=id,type,addr,port | id = 0-4, type = TCP/UDP, addr = IP address, port = port | |
Send TCP/IP data | ||
(CIPMUX=0) AT+CIPSEND=length; (CIPMUX=1) AT+CIPSEND= id,length |