How to Send Humidity and Temperature value to ThinkSpeak using ESP8266 DHT11 sensor module Arduino

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ธ.ค. 2024

ความคิดเห็น • 106

  • @billglass5160
    @billglass5160 3 ปีที่แล้ว +6

    Good video. I did it. It works. Thank you! Beware! 2 problems: 1. SoftwareSerial does not work correctly at baudrates>9600. As I couldn't change the ESP8266 to anything other than 115200, I used the hardware serial pins. But, when you upload the code, you have to disconnect the ESP8266 Tx and Rx pins. Also, you can't use the serial monitor for debugging. 2. I used the Arduino Nano which only furnishes 50 mA on the 3.3V pin but the UNO doesn't do much better and the ESP8266 can consume 150mA or more in certain cases. I used an AMS1117 3.3V regulator connected to an external 5V power supply to make everything work. Once I did those 2 things, it worked like a charm!

    • @eshwarv645
      @eshwarv645 2 ปีที่แล้ว

      fuck its not working bro can u help ASAP
      PLSSSSS

    • @billglass5160
      @billglass5160 2 ปีที่แล้ว

      @@eshwarv645 What is not working? The temperature measurement or access to ThingSpeak or ....?
      If it's access to ThingSpeak via ESP8266 that is not working, refer to my debug procedure below as well as a link to another useful TH-cam tutorial:
      th-cam.com/video/bq-_4o9-YKc/w-d-xo.html
      schematic
      -------------
      esp8266_01(top view seeing antenna on the right)
      -------------------------------------------------------------------
      Txd gnd
      ch_pd GPIO2
      RST GPIO0
      Vcc Rxd
      esp01(Rx)---------ftdi(Tx)
      esp01(Vcc)--------ftdi(Vcc3.3V)
      esp01(CH_PD)----ftdi(Vcc3.3V)
      esp01(Tx)----------ftdi(Rx)
      esp01(gnd)--------ftdi(gnd)
      Use ADI Arduino Serial Monitor
      AT
      AT+UART_DEF=9600,8,1,0,0
      AT+GMR (firmware version)
      AT+CWMODE?
      AT+CWMODE=1 (x value: 1=STA, 2=AccessPoint, 3=both)
      AT+CWLAP (access of all nearby wifi accesses)
      AT+CWJAP="xxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxx"
      AT+CIPMUX=1
      ------------------------ sending data to channel field1 ---------------------------
      AT+CWMODE=1
      AT+CWJAP="xxxxxxxxxxxx","xxxxxxxxxxxxxxxxxxxxxxxxxx"
      AT+CIPMUX=1
      AT+CIPSTART=0,"TCP","api.thingspeak.com",80
      AT+CIPSEND=0,76
      GET api.thingspeak.com/update?api_key=xxxxxxxxxxxxxxxx&field1=66
      CR
      Results:
      Recv 76 bytes
      SEND OK
      +IPD,0,4:19770,CLOSED

    • @gaganhs8066
      @gaganhs8066 8 หลายเดือนก่อน

      what board did you select??

    • @billglass5160
      @billglass5160 8 หลายเดือนก่อน

      @@gaganhs8066 As I said, Arduino Nano.

  • @Vaigyanikbabashorts
    @Vaigyanikbabashorts 3 ปีที่แล้ว

    i got it is video pe jo circuit or code hai ok tested hai tnx bro apne itna detail me guide kiya

  • @maheswarikannan6797
    @maheswarikannan6797 4 ปีที่แล้ว +11

    I get only fail msg on the serial monitor.... How to solve this condition?...
    Plz explain about the progrm

  • @kavitayadav1373
    @kavitayadav1373 4 ปีที่แล้ว +3

    Thankyou! I have successfully completed this project.

  • @samuelmalarik4296
    @samuelmalarik4296 4 ปีที่แล้ว +5

    Can anyone explain what im doing wrong, I connected the arduino like in the video, i uploaded library and code but ESP wont connect to wifi ??

  • @michelfrance75
    @michelfrance75 2 ปีที่แล้ว +1

    For this project, the arduino board is not required. A RS232 FTI interface may be used only to program the ESP8266-01 then the server is operating with the ESP8266-01 board alone.

  • @pranjal4857
    @pranjal4857 10 หลายเดือนก่อน

    big fan sir, mur project tu hol sir apunar video sai
    apuni assam r neki baru?
    joi aai axom

  • @abbasezzi8789
    @abbasezzi8789 2 ปีที่แล้ว

    Thanks man, the best explanation of how to transmit data on on IoT device.

  • @subinkrishnakt4058
    @subinkrishnakt4058 6 หลายเดือนก่อน

    In your video i can see you connected resistors but those are not in CKT diagram?????

  • @jamessalvador8075
    @jamessalvador8075 11 หลายเดือนก่อน

    Instead of ThingSpeak is there a way for the value to be sent to google sheets?

  • @luqmanalhakim2113
    @luqmanalhakim2113 4 ปีที่แล้ว +2

    my AT command is fail why is this happen in the serial monitor? help me

  • @chuihucuccucu-pk1fr
    @chuihucuccucu-pk1fr ปีที่แล้ว

    Is it going to work without the resistors?

  • @abdulmlaikalomayri727
    @abdulmlaikalomayri727 2 ปีที่แล้ว

    The temp thingspeak did not get displaying the data. also, I did not get any error message. should esp lighting when its working or not?

  • @MissJB360
    @MissJB360 4 ปีที่แล้ว +2

    Hi. It's displaying on the serial monitor but there's no change of data on the thingspeak website. Pls what do I do

    • @fatherloz2800
      @fatherloz2800 4 ปีที่แล้ว

      Make certain that your wifi network ssid info is the same as seen if you were to be logged into you 192.168.0.1 adress, i used the info underneath the router but that was not correct, it works now !!!

  • @djjjozsi
    @djjjozsi 4 ปีที่แล้ว +3

    No word about resistors. Could you please explain it? Thank you very much.

    • @durgaprasad471
      @durgaprasad471 3 ปีที่แล้ว +1

      Resistors on breadboard not connected. Not required

  • @AsaphAhouandjinou
    @AsaphAhouandjinou 4 หลายเดือนก่อน

    Very useful tutorial ✨
    Please what 5 means in the following command : sendcommand("AT+CWMODE=1", 5, "OK");

  • @ashuntu2010
    @ashuntu2010 2 ปีที่แล้ว

    May I know, you have uploaded the program in the Arduino and not in the ESP8266-01 chip ? Did you make any changes in the ESP8266-01 firmware or did you upload any program in the ESP8266-01 chip also before making this video ?

    • @holucha2142
      @holucha2142 ปีที่แล้ว

      there is difference between node mcu and wifi module

    • @KaranYadav-tc9sk
      @KaranYadav-tc9sk ปีที่แล้ว

      He is asking this code is uploaded in arduino only or esp8266 too??

  • @alangrenner
    @alangrenner 3 ปีที่แล้ว

    I would like to thank you for that video. I had a project where I had to do exactly that and I spent hours upon hours trying until I fond your tutorial. Thank you!

  • @naveengoel8935
    @naveengoel8935 4 ปีที่แล้ว +1

    Thanks a lot...I have done it successfully

  • @digitzero3613
    @digitzero3613 5 ปีที่แล้ว +3

    Hi, I would love to know why you have added those resistors in the circuit but I can't see them in the circuit diagram you shown earlier in the video. Can you please explain how to know where to add resistors and why? Thanks for the tutorial though.

    • @MrFaex10
      @MrFaex10 4 ปีที่แล้ว

      Hi, I have the same problem, did you solve it?

    • @digitzero3613
      @digitzero3613 4 ปีที่แล้ว

      @@MrFaex10 Yes, I watched a video explaining pull-up and pull-down registers and it explains why we are using it here.

    • @LearningWayz
      @LearningWayz 4 ปีที่แล้ว

      Hello bro can u plz tell me what is wifi password role

    • @digitzero3613
      @digitzero3613 4 ปีที่แล้ว +1

      @@LearningWayz Since the ESP8266 needs access to the internet to send data, it needs to connect to a Wifi. You can start a hotspot from phone and enter the Wifi name and password in the code.

    • @LearningWayz
      @LearningWayz 4 ปีที่แล้ว

      Send me the code of Arduino uno

  • @jeremytiempo9639
    @jeremytiempo9639 3 ปีที่แล้ว

    is there any configuration for esp8266 module ?? how about the setup for beginners?

  • @Munthermohammedaljaf
    @Munthermohammedaljaf 2 ปีที่แล้ว

    Great work, I have a Q plz, if I want to send max30100 data how could I send the heart beat for Field1 and oxygen to Field2, plus i have LM35 sending the data to Field3

  • @jmunoz66SV
    @jmunoz66SV 4 ปีที่แล้ว

    I will implement it for a data center controller. I will share my experiences later

  • @rahulmm6350
    @rahulmm6350 2 ปีที่แล้ว

    thankyou bro very helpful

  • @nafizimtiaz4292
    @nafizimtiaz4292 ปีที่แล้ว

    Data is not uploading in thingspeak. When i saw in the serial monitor it was showing API fail. Can anyone give me solution? It's urgent

  • @RahulKumar-od9ns
    @RahulKumar-od9ns 2 ปีที่แล้ว

    esp8266_thingsspeak_temp_and_humidity:2:10: fatal error: dht11.h: No such file or directory
    #include
    ^~~~~~~~~
    compilation terminated.
    exit status 1
    dht11.h: No such file or directory
    unable remove above error plz help, i have added the library also but still error is there.

  • @angeljoerrytabla699
    @angeljoerrytabla699 3 ปีที่แล้ว

    Will it work if i use dht22?

  • @Duncanwg7
    @Duncanwg7 4 ปีที่แล้ว +5

    Doesnt work, softwareserial esp8266(rx tx) redeclared as different symbol

  • @promakers1883
    @promakers1883 3 ปีที่แล้ว +1

    I am getting error at esp8266

  • @hayderqaso5232
    @hayderqaso5232 3 ปีที่แล้ว +1

    softwareserial esp8266(RX,TX);
    NOT WORKING
    PLEASE HELP

    • @t-graphic1010
      @t-graphic1010 3 ปีที่แล้ว

      i have the same problem but if you use pin 2 and pin 3 switch the cables on it now its working by me

    • @atharvapawar4105
      @atharvapawar4105 3 ปีที่แล้ว

      Can you share the circuit diagram

    • @fabexiyt
      @fabexiyt 2 ปีที่แล้ว

      @@t-graphic1010 Nice tip! Switching the cables also worked for me!

  • @imreszili8920
    @imreszili8920 3 ปีที่แล้ว

    How can I set the sendig time? Becuse it send the datad (temperature and humiditi) about every 10 sec. I can save energy. Thanks a lot.

    • @VISHAL-vl4yf
      @VISHAL-vl4yf 3 ปีที่แล้ว

      to do so you might think of some other platform as by default in Think speak the it takes atleast 15seconds to upload new reading/value . in short you cannot change that ,thats drawback of thinkspeak website

  • @lorddeysel7915
    @lorddeysel7915 3 ปีที่แล้ว

    would i be able to use a arduino nano with this code

    • @onkarbatra9884
      @onkarbatra9884 3 ปีที่แล้ว

      You surely can because UNO and Nano both are same except the size. Both are using same processor, so the answer is yes!

  • @shivaprakash3654
    @shivaprakash3654 4 ปีที่แล้ว

    hai sir i am using this code with uno it works properly when i connect it to mega at fail command appears on serial monitor. how can i solve it plz help me

  • @airbrushernst
    @airbrushernst 4 ปีที่แล้ว

    Tnx for the video
    But...... the esp-01 is an 10 times more powerfull processor as an Uno
    You can put everything in the ESP and it will work and 10 times faster.

  • @yogeshsonawane
    @yogeshsonawane 3 ปีที่แล้ว

    Arduino: 1.8.13 (Windows 10), Board: "Generic ESP8266 Module, 80 MHz, Flash, Disabled (new aborts on oom), Disabled, All SSL ciphers (most compatible), 32KB cache + 32KB IRAM (balanced), Use pgm_read macros for IRAM/PROGMEM, dtr (aka nodemcu), 26 MHz, 40MHz, DOUT (compatible), 1MB (FS:64KB OTA:~470KB), 2, nonos-sdk 2.2.1+100 (190703), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
    esp8266_thingsspeak_temp_and_humidity:18:23: error: 'SoftwareSerial esp8266' redeclared as different kind of entity
    18 | SoftwareSerial esp8266(RX,TX);
    | ^
    In file included from C:\Users\lenovo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.1\cores\esp8266/Arduino.h:42,
    from sketch\esp8266_thingsspeak_temp_and_humidity.ino.cpp:1:
    C:\Users\lenovo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.1\cores\esp8266/core_esp8266_version.h:121:11: note: previous declaration 'namespace esp8266 { }'
    121 | namespace esp8266 {
    | ^~~~~~~
    C:\Users\lenovo\Downloads\esp8266_thingsspeak_temp_and_humidity\esp8266_thingsspeak_temp_and_humidity.ino: In function 'void setup()':
    esp8266_thingsspeak_temp_and_humidity:22:10: error: expected primary-expression before '.' token
    22 | esp8266.begin(9600);
    | ^
    C:\Users\lenovo\Downloads\esp8266_thingsspeak_temp_and_humidity\esp8266_thingsspeak_temp_and_humidity.ino: In function 'void loop()':
    esp8266_thingsspeak_temp_and_humidity:34:9: error: expected primary-expression before '.' token
    34 | esp8266.println(getData);delay(1500);countTrueCommand++;
    | ^
    C:\Users\lenovo\Downloads\esp8266_thingsspeak_temp_and_humidity\esp8266_thingsspeak_temp_and_humidity.ino: In function 'void sendCommand(String, int, char*)':
    esp8266_thingsspeak_temp_and_humidity:69:12: error: expected primary-expression before '.' token
    69 | esp8266.println(command);//at+cipsend
    | ^
    esp8266_thingsspeak_temp_and_humidity:70:15: error: expected primary-expression before '.' token
    70 | if(esp8266.find(readReplay))//ok
    | ^
    Multiple libraries were found for "SoftwareSerial.h"
    Used: C:\Users\lenovo\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.1\libraries\SoftwareSerial
    Not used: C:\Users\lenovo\Documents\Arduino\libraries\EspSoftwareSerial
    exit status 1
    'SoftwareSerial esp8266' redeclared as different kind of entity
    This report would have more information with
    "Show verbose output during compilation"
    option enabled in File -> Preferences.

  • @KandraTechinKannada
    @KandraTechinKannada 3 ปีที่แล้ว

    thank you very much ,

  • @1CoreGame
    @1CoreGame 5 ปีที่แล้ว +1

    no resistors on circuit diagram come on!

  • @hyunglegaspi6220
    @hyunglegaspi6220 3 ปีที่แล้ว

    I tried everything but it always "fail"

  • @arnoldswagger5050
    @arnoldswagger5050 3 ปีที่แล้ว +1

    Thanks man! Works like a charm for me :)

  • @LearningWayz
    @LearningWayz 4 ปีที่แล้ว

    If anyone have full correct code plz send

  • @topmaster5314
    @topmaster5314 4 ปีที่แล้ว

    Nice one thank you

  • @shreyasaditya2184
    @shreyasaditya2184 2 ปีที่แล้ว

    thanks a lot

  • @fatherloz2800
    @fatherloz2800 4 ปีที่แล้ว

    Thanks for all of this :) Now im trying to see if i can set this to send info every 10 minutes :)

    • @LearningWayz
      @LearningWayz 4 ปีที่แล้ว

      Bro can u send me the code

  • @JesusMartinez-dz5ez
    @JesusMartinez-dz5ez 3 ปีที่แล้ว

    Why he put a lot of resistors?

  • @kiriharasoma4194
    @kiriharasoma4194 4 ปีที่แล้ว +1

    can someone help me? it fails to send data to thingspeak
    0. at command => AT Fail
    0. at command => AT+CWMODE=1 Fail
    error!
    warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    sendCommand("AT+CIPCLOSE=0",5,"OK");

    • @LearningWayz
      @LearningWayz 4 ปีที่แล้ว

      Bro u resolve this problem

    • @kiriharasoma4194
      @kiriharasoma4194 4 ปีที่แล้ว

      @@LearningWayz not resolved yet..

    • @jayzee1294
      @jayzee1294 4 ปีที่แล้ว

      Did you try using another ESP-01 module? It might be because of different firmware version.

    • @luqmanalhakim2113
      @luqmanalhakim2113 4 ปีที่แล้ว

      why this problem occured? can anyone explain it?

    • @LuciferMorningstar-bj5fh
      @LuciferMorningstar-bj5fh 3 ปีที่แล้ว +1

      This error occurs when the 2 working frequencies of 2 incompatible devices. Try adding delay (500) to each command line. i tried it and it works fine

  • @debashisroy9025
    @debashisroy9025 3 ปีที่แล้ว

    Thank you!

  • @sainadhkollapureddy5436
    @sainadhkollapureddy5436 2 ปีที่แล้ว

    Bro code is expired

  • @prachipatil2977
    @prachipatil2977 4 ปีที่แล้ว

    Please send code for this.

  • @serenamatla5712
    @serenamatla5712 3 ปีที่แล้ว

    Thank You

  • @benromdhanehajrioussama7312
    @benromdhanehajrioussama7312 2 ปีที่แล้ว

    Thankx man

  • @sainadhkollapureddy5436
    @sainadhkollapureddy5436 2 ปีที่แล้ว

    Send me the code bro to try

  • @poykhampot
    @poykhampot 4 ปีที่แล้ว

    thankyou

  • @guillaume6659
    @guillaume6659 5 ปีที่แล้ว

    Work, but i don't have all datas on ThingSpeak... Thank you !

    • @sharifullah1982
      @sharifullah1982 5 ปีที่แล้ว

      Brother please share the full code.

    • @guillaume6659
      @guillaume6659 5 ปีที่แล้ว

      @@sharifullah1982
      #include
      #include
      SoftwareSerial ESP8266(10, 11);
      String apiKey = "****************"; // Enter your Write API key from ThingSpeak
      const char* ssid = "**************"; // Enter your WiFi Network's SSID
      const char* pass = "****************"; // Enter your WiFi Network's Password
      const char* server = "api.thingspeak.com";
      LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
      float humi;
      float temp;
      #define dht_dpin 7
      dht DHT;
      WiFiClient client;
      void setup() {
      Serial.begin(115200);
      delay(10);
      dht.begin();
      Serial.println("Connecting to ");
      Serial.println(ssid);

      WiFi.begin(ssid, pass);
      while (WiFi.status() != WL_CONNECTED)
      {
      delay(100);
      Serial.print("*");
      }
      Serial.println("");
      Serial.println("***WiFi connected***");
      }
      void loop() {
      humi = dht.readHumidity();
      temp = dht.readTemperature();
      humi = dht.readHumidity();
      temp = dht.readTemperature();
      if (client.connect(server,80)){
      String sendData = apiKey+"&field1="+String(temp)+"&field2="+String(humi)+"

      ";
      //Serial.println(sendData);
      client.print("POST /update HTTP/1.1
      ");
      client.print("Host: api.thingspeak.com
      ");
      client.print("Connection: close
      ");
      client.print("X-THINGSPEAKAPIKEY: "+apiKey+"
      ");
      client.print("Content-Type: application/x-www-form-urlencoded
      ");
      client.print("Content-Length: ");
      client.print(sendData.length());
      client.print("

      ");
      client.print(sendData);
      Serial.print("Temperature: ");
      Serial.print(temp);
      Serial.print("deg C. Humidity: ");
      Serial.print(humi);
      Serial.println("%. Connecting to Thingspeak.");
      lcd.setCursor(0,0);
      lcd.print(DHT.humidity);
      lcd.print(" % - ");
      lcd.print(DHT.temperature);
      lcd.print("*C");
      lcd.setCursor(0,1);
      }
      client.stop();
      Serial.println("Sending....");
      delay(5000);
      }

    • @sharifullah1982
      @sharifullah1982 5 ปีที่แล้ว

      @@guillaume6659 Bundle of thanks!

    • @guillaume6659
      @guillaume6659 5 ปีที่แล้ว

      @@sharifullah1982 i don't advise you tu use this module. It's to hard to work with it.
      I prefered to use wemos or nodemcu

    • @sharifullah1982
      @sharifullah1982 5 ปีที่แล้ว

      @@guillaume6659 exactly it gives esp fatal error again and again. Though my programe is compiled and uploaded corectly.

  • @vvttggyy
    @vvttggyy 4 ปีที่แล้ว

    nice

  • @papaikarmakar84
    @papaikarmakar84 หลายเดือนก่อน

    DHT11 is good for temperature but very inaccurate for humidity

  • @surekhakohle4360
    @surekhakohle4360 3 ปีที่แล้ว +1

    Can anyone help to get code......from video 3.40 i am not getting

  • @-Ramani-go2zq
    @-Ramani-go2zq ปีที่แล้ว

    I am getting errors while compiling the code

  • @surekhakohle4360
    @surekhakohle4360 2 ปีที่แล้ว

    Can anyone help to get code......from video 3.40 i am not getting