Sunday, September 2, 2018

WIFI ESP8266 module (arduino)


WIFI ESP8266 module (arduino)





           

The ESP8266 Wifi module is a complete Wi­Fi network where you can easily connect as a serving Wi- Fi adapter, wireless internet access interface to any microcontroller­ based design on its simple connectivity through Serial Communication or UART interface.

                                 
 Communication with ESP8266 is via Attention Command or AT Commands.



for more information about AT commands 👈👈👈👈👈👈👈





PRACTICALS DONE-

1.Uploading data on THINGSPEAK IOT PLATFORM(CLOUD) with the help of esp8266.



For performing this practical we need to sign up on thingspeak

Go to link :-thingspeak.com




After signing up on thingspeak we will get CHANNEL ID,READ API KEY,WRITE API KEY AND API REQUESTS . With help of above parameters we can write data on thingspeak cloud. These parameters are to provided in the software .


HARDWARE CONNECTIONS OF ESP8266-




CODE TO UPLOAD DATA TO THINSPEAK CLOUD -












simple code for display the value on cloud service using wifi module -



int len;

int temp=0;

void setup() {

 Serial.begin(115200);

 Serial.println("AT");

 delay(5000);

  Serial.println("AT+CWMODE=1");

  delay(2000);

  Serial.println("AT+CWJAP=\"hotspot name\"\,\"password\"");

  delay(2000);

  //connecting





}



void loop() {

  delay(2000);



    Serial.println("AT+CIPSTART=\"TCP\"\,\"THINGSPEAK.COM\"\,\"80\""); // thingspeak is a cloud service. we can use ip instead of url

    delay(2000);

    len=length();

  Serial.println("AT+CIPSEND=len");



  Serial.println("GET/update?key=4W058L1VRDLACHJ7&field1=temp");

  delay(2000);



  Serial.println("AT+CIPCLOSE");



temp++;


}
Tech IOT Web Developer

No comments:

Post a Comment