Esp 8266 bmp280 and dweet

Iam trying to find a sketch which will dweet temperature pressure using esp8266 and bmp280, is this possible and does such a sketch exist ?. the reason I want to dweet (every 10 minutes ) is because it will be in my caravan and connected to a mifi unit connected to mobile network so very limited data .

Question by Davidjones24 10 months ago


What is the Absolute Easiest way to turn an LED on and off with the ESP 8266?

Is there a bare-bones guide to using JUST an ESP 8266 wifi module to blink an LED On and Off?   I've read my way in circles about GCC and reflasing IoT Firmwares and AT commands... and I'm so confused.  I just want to have it connect to my wifi, and with something simple (go to a web page, send a packet, write a terminal command, whatever), energize a pin.  Do something else, deenergize that pin...

Question by jongscx 4 years ago  |  last reply 2 years ago


Help regard ESP 8266 or HC 05? Answered

Hi guys! :3 So I'm in need of some help regarding this project https://www.instructables.com/id/Make-A-Simple-Bidepal-Humanoid-Robot/ According to the project, you need to reprogram the robot for every function but it would be very tedious and time consuming to program it again and again. So, I thought that it would be nice to use a HC 05 or ESP 8266 (along with arduino) with a program to control whether it's walking, kicking or dancing etc. so I could control it through my mobile. The problem is that I have zero skills on developing software for the mobile, arduino or esp. I would love it if anyone could help me by making a small program. Also, would it be better to use the Bluetooth module or ESP? I would prefer ESP as it's cheaper but not by alot so if the Bluetooth module has benefits, I can buy that. Thanks in advance. :)

Question by SA-DIY 2 years ago  |  last reply 2 years ago


HOW TO SHOW DYNAMIC GPS DATA AND AUTO REFRESH PAGE ON WEB BROWSER ?

Hello, I'm using ESP8266 WIFI module and GPS module. I have connected to ARDUINO UNO R3 board to read the GPS coordinates and transmit them to webpage using ESP8266 WiFi module connected to router. In my code the page change only when I press F5 (refresh) , and so I can see the change of Coordinates. I want to see the changing results dynamically with out refreshing the webpage. what to I need to do /change in order that it will change automatically? please check my code here or in the attachment  and suggest me the changes. Thanks in advance. CODE: // code starts #include #include SoftwareSerial Serial1(2,3);     //   ESP8266 RX pin 2, TX pin 3. SoftwareSerial gps(11, 10);       //   GPS RX pin 10, TX pin 11.   boolean No_IP=false; String IP=""; String webpage=""; int i=0,k=0; int  gps_status=0; String name=" Name: XXXXXXXX ";   //22 String date="DATE: DD MM YYYY";     //21 String number=" Vehicle No.: ABC 0000";//29 String cordinat="Coordinates:";          //17 String latitude=""; String logitude="";                       String gpsString=""; char *test="$GPGGA"; void check4IP(int t1) {   int t2=millis();   while(t2+t1>millis())   {     while(Serial1.available()>0)     {       if(Serial1.find("WIFI GOT IP"))       {         No_IP=true;       }     }   } } void get_ip() {   IP="";   char ch=0;   while(1)   {     Serial1.println("AT+CIFSR");     while(Serial1.available()>0)     {       if(Serial1.find("STAIP,"))       {         delay(1000);         Serial.print("IP Address:");         while(Serial1.available()>0)         {           ch=Serial1.read();           if(ch=='+')           break;           IP+=ch;         }       }       if(ch=='+')       break;     }     if(ch=='+')     break;     delay(1000);   }   Serial.print(IP);   Serial.print("Port:");   Serial.println(80);   delay(1000); } void connect_wifi(String cmd, int t) {   int temp=0,i=0;   while(1)   {     Serial.println(cmd);     Serial1.println(cmd);     while(Serial1.available()>0)     {       if(Serial1.find("OK"))       {       i=8;       }     }     delay(t);     if(i>5)     break;     i++;   }   if(i==8)   {     Serial.println("OK");   }   else   {   Serial.println("Error");   }   delay(1000); } void setup() {   Serial1.begin(9600);   Serial.begin(9600);   delay(1000);   connect_wifi("AT",1000);   connect_wifi("AT+CWMODE=3",1000);   connect_wifi("AT+CWQAP",1000);    connect_wifi("AT+RST",5000);   check4IP(5000);   if(!No_IP)       {         Serial.println("Connecting Wifi....");         connect_wifi("AT+CWJAP=\"MountPointTech\",\"MpTl2013\"",7000);   //AT+CWJAP="wifi_username","wifi_password"       }       else         {         }       Serial.println("Wifi Connected");       get_ip();       delay(2000);       connect_wifi("AT+CIPMUX=1",100);       connect_wifi("AT+CIPSERVER=1,80",100);       Serial1.end();       Serial.println("Waiting For GPS");       Serial.println("     Signal    ");       delay(2000);       gps.begin(9600);       get_gps();       show_coordinate();       gps.end();       Serial1.begin(9600);       delay(2000);      Serial.println("GPS is Ready");       delay(1000);       Serial.println("System Ready.."); } void loop() {   k=0;   Serial.println("Please Refresh Ur Page");   while(k<1000)   {     k++;    while(Serial1.available())    {     if(Serial1.find("0,CONNECT"))     {       Serial1.end();         gps.begin(9600);       get_gps();       gps.end();       Serial1.begin(9600);       Serial1.flush();       Serial.println("Start Printing");       Send();       show_coordinate();       Serial.println("Done Printing");       delay(5000);       //delay(1000);       k=1200;       break;     }   }   delay(1); } } void gpsEvent() {   gpsString="";   while(1)   {    while (gps.available()>0)                //Serial incoming data from GPS    {     char inChar = (char)gps.read();      gpsString+= inChar;                    //store incoming data from GPS to temporary string str[]      i++;      if (i < 7)                           {       if(gpsString[i-1] != test[i-1])       //check for right string       {         i=0;         gpsString="";       }      }     if(inChar=='\r')     {      if(i>65)      {        gps_status=1;        break;      }      else      {        i=0;      }     }   }    if(gps_status)     break;   } } void get_gps() {    gps_status=0;    int x=0;    while(gps_status==0)    {     gpsEvent();     int str_lenth=i;     latitude="";     logitude="";     coordinate2dec();         i=0;x=0;     str_lenth=0;    } } void show_coordinate() {         Serial.print("Latitude:");     Serial.println(latitude);     Serial.print("Longitude:");     Serial.println(logitude); } void coordinate2dec() {         //j=0;     String lat_degree="";     for(i=18;i<20;i++)          //extract latitude from string       lat_degree+=gpsString;         String lat_minut="";     for(i=20;i<28;i++)       lat_minut+=gpsString;         String long_degree="";     for(i=30;i<33;i++)          //extract longitude from string       long_degree+=gpsString;           String long_minut="";     for(i=33;i<41;i++)       long_minut+=gpsString;            float minut= lat_minut.toFloat();      minut=minut/60;      float degree=lat_degree.toFloat();      latitude=degree+minut;           minut= long_minut.toFloat();      minut=minut/60;      degree=long_degree.toFloat();      logitude=degree+minut; } void Send() {            webpage = "Welcome to MountPoint Technologies Pvt Ltd";       webpage+=name;       webpage+=date;       webpage+=number;       webpage+=cordinat;       webpage+="Latitude:";       webpage+=latitude;       webpage+="";       webpage+="Longitude:";       webpage+=logitude;       webpage+="";       webpage+= "       webpage+=latitude;       webpage+='+';              //28.612953, 77.231545   //28.612953,77.2293563       webpage+=logitude;       webpage+="\">Click Here for google map ";       sendwebdata();       webpage="";        while(1)          {       Serial.println("AT+CIPCLOSE=0");       Serial1.println("AT+CIPCLOSE=0");       while(Serial1.available())       {         //Serial.print(Serial1.read());         if(Serial1.find("0,CLOSE"))         {           return;         }       }       delay(500);       i++;       if(i>5)       {         i=0;       }       if(i==0)       break;      } } void sendwebdata() {      i=0;      while(1)      {       unsigned int l=webpage.length();       Serial1.print("AT+CIPSEND=0,");       Serial1.println(l+2);       Serial.println(l+2);       Serial.println(webpage);       Serial1.println(webpage);       while(Serial1.available())       {         if(Serial1.find("OK"))         {          return;         }       }             i++;       if(i>5)         i=0;         if(i==0)         break;       delay(200);      } } // end of code.

Topic by shivendrareddy 2 years ago