ESP32 Send Temperature and Humidity Data to localhost XAMPP for Absolute Beginners Step by Step

In this tutorial video, you will learn how to send temperature and humidity data from an ESP32 microcontroller to a localhost XAMPP server using a simple PHP script. This video is specifically designed for absolute beginners who have little or no experience with programming and web development.
The video covers all the necessary steps in a step-by-step manner, including downloading and installing XAMPP, setting up the project folder, writing and testing the PHP script, and finally, sending fake data to the server using the ESP32 serial monitor.
Additionally, the video also explains the code used to send the temperature and humidity data from the ESP32 to the server and provides line-by-line explanations of the PHP script used to receive and store the data in a MySQL database.
By the end of the video, you will have a working system that can send and store real-time data from your sensors.
--------------------------------------------------------------------------------------------------------------------
Buy On Amazon
--------------------------------------------------------------------------------------------------------------------
1. ESP32 Espressif - amzn.to/3YCq2dS
2. DHT11 Temperature Humidity Sensor - amzn.to/421TIUD
3. Breadboard - amzn.to/3ysOvHX
--------------------------------------------------------------------------------------------------------------------
Useful Video Links
--------------------------------------------------------------------------------------------------------------------
Send DHT11 data to PHP MySQL Server
• Send DHT11 data to PHP...
--------------------------------------------------------------------------------------------------------------------
Social Media Links
--------------------------------------------------------------------------------------------------------------------
GitHub:
github.com/ahmadlogs/
KZread:
kzread.info?sub...
--------------------------------------------------------------------------------------------------------------------
Download Code
--------------------------------------------------------------------------------------------------------------------
github.com/ahmadlogs/xampp-esp32
--------------------------------------------------------------------------------------------------------------------
Disclaimer
--------------------------------------------------------------------------------------------------------------------
Disclaimer: All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
Warning: I will use High Voltages which if incorrectly or improperly used could result in serious injuries or death. So be careful of what you are doing because I will take no responsibility for any of your actions.
Warning: In some countries it is required to register GSM module from govt authorities before using it. So, get proper understanding of govt laws related to GSM technologies.
#esp32 #dht11 #xamppserver

Пікірлер: 212

  • @ansellroman6620
    @ansellroman6620 Жыл бұрын

    httpCode: -1 how i can solve this ??? i think the program is no error. please help

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    The issue you're facing seems to be related to the connection to the localhost. It's possible that your firewall or antivirus software is blocking the connection. To verify this, you can follow these steps: 1. Disable the antivirus and firewall temporarily. 2. Confirm the IP address of your computer. You can do this by checking the network settings or using the command prompt and typing "ipconfig" (for Windows) or "ifconfig" (for macOS/Linux). 3. Check the IP address displayed in the serial monitor of your Arduino. By comparing the IP addresses, you can determine if they match. If they don't match, it could indicate a network configuration issue or a problem with the code. However, if they match and you are still unable to establish a connection, it's likely that the firewall or antivirus software is causing the problem. Remember to re-enable your antivirus and firewall once you have completed the troubleshooting steps. If you continue to experience issues, please provide more details or specific error messages so that I can assist you further. In addition to the steps mentioned earlier, please ensure that both Apache and MySQL services are running on your computer. Here's how you can check: 1. For Apache: Open your web browser and enter "localhost" or "127.0.0.1" in the address bar. If you see a default web page or the Apache server page, it indicates that Apache is running correctly. If not, you may need to start the Apache service. This can typically be done through a control panel or using commands specific to your operating system. 2. For MySQL: You can use a graphical user interface (GUI) tool like phpMyAdmin or MySQL Workbench to verify the status of the MySQL server. Alternatively, you can open the command prompt and enter the command "mysql -u root -p". If you can access the MySQL prompt without any errors, it means that MySQL is running properly. If you encounter any connection errors, you might need to start the MySQL service. Ensuring that both Apache and MySQL are running will ensure the proper functioning of your local development environment. If you encounter any issues or error messages during these checks, please let me know so that I can provide further assistance.

  • @sujayhl145

    @sujayhl145

    Жыл бұрын

    Sir please make a video related to it

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@sujayhl145 I will try

  • @rappuff6458

    @rappuff6458

    11 ай бұрын

    @@AhmadLogs is the video up yet sir?

  • @yasaskumarasinghe1830

    @yasaskumarasinghe1830

    11 ай бұрын

    i have the same issue, i try several method using both wampserver and xampp. still no solution, anyone got the answer for this particular error

  • @edinetgrunhed6000
    @edinetgrunhed60002 ай бұрын

    now, i know PHP is not dead, it so simple,powerful and once you installed XAMPP everything is there, thank you the video

  • @savvycreativeadventurer
    @savvycreativeadventurer10 ай бұрын

    Brilliant! Thank you so much for the easy to understand and follow explanation! So easy to understand and yet such a detailed and thorough explanation. I actually done the setup of my "web server" on a small arm single board computer and i could still follow the examples, just had to change a directory or two in order to us the http folder in my setup.

  • @mrx.0000
    @mrx.000010 ай бұрын

    This helped me a lot.Thank you !,very much.

  • @Elsa.zoneNt
    @Elsa.zoneNt Жыл бұрын

    Thanks! This helped a lot, unliked those others who throw codes at you and call it a "tutorial".

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    thanks

  • @happymatekenya394
    @happymatekenya39410 ай бұрын

    I am using raspberry pi pico W in Thonny and after following your approach I am now able to send data to my localhost. Thanks alot Sir

  • @user-nb1zf8iy5m
    @user-nb1zf8iy5m9 ай бұрын

    Excellant presentation. Thank you very much.

  • @huytuan6452
    @huytuan64529 ай бұрын

    this video helped me a lot, thankyou so much

  • @mvcart6316
    @mvcart63168 ай бұрын

    You have saved my Final Paper!!!!!!!

  • @collinsk8754
    @collinsk87546 ай бұрын

    Great tutorial! 👏👏

  • @kientong3455
    @kientong34552 ай бұрын

    thank you sir! you literally saved my project!

  • @amiralimohammadi2069
    @amiralimohammadi20693 ай бұрын

    it's was perfect, I'm really enjoyed

  • @philippe5394
    @philippe5394Ай бұрын

    Hello Ahmad, thank you very much for this tutorial which corresponds quite well to what I want to do. That is, to log the measurements of a JSY-MK-194T module in a MySql database. Thanks to you, I have all the keys to finalize what I've started.

  • @danilospinolabatista3249
    @danilospinolabatista32497 ай бұрын

    nice video, helped me a lot

  • @quaninhphamhong7130
    @quaninhphamhong713011 ай бұрын

    appreciate your vids so much. They helped me a lot

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    so nice of you

  • @Lets_Travel712
    @Lets_Travel7123 ай бұрын

    nice video it helped me alot . thank u sir

  • @roycun5013
    @roycun5013Ай бұрын

    excellent video..❤

  • @brunodalessio4622
    @brunodalessio4622 Жыл бұрын

    Thank you very much for this great tutorial and for the very clear explanations. Next step would be to have the temperature with one decimal cipher

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    Great suggestion! can you giveme some more detail

  • @aligermah3674
    @aligermah3674 Жыл бұрын

    greaat thanks alot every thing is explened well thanks alot

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    so nice of you

  • @Lovely-bx8se
    @Lovely-bx8se2 ай бұрын

    Bonjour, voila enfin un vrais tuto .Merci pour ce temps passé pour cette réalisation. Après avoir réalisé ce projet, j'ai put refaire le même avec un capteur DS18B20 avec un esp8266 ( avec quelque modifications très simple bien sur ).Cela fonctionne parfaitement que ce soit avec XAMPP ou Lamp sur le PI. Continuez , vos vidéos son très intéressantes et riches d'informations. Pour ceux qui on cherché comme moi pour ce genre de projet, ne cherchez plus vous avez trouvé.

  • @b_space_technology

    @b_space_technology

    2 ай бұрын

    Je suis du meme avis. Vous êtes de quel pas ?

  • @Lovely-bx8se

    @Lovely-bx8se

    2 ай бұрын

    @@b_space_technology Bonjour,de quel pays?De France,pas loin de Paris

  • @b_space_technology

    @b_space_technology

    2 ай бұрын

    @@Lovely-bx8se ok super ! J’ai un souci avec ma connexion HTTPclient. Ca me donne un message d’erreur not found. J’aimerai savoir si vous avez exécuté le code net comme dans la vidéo et cela a marché ?

  • @Lovely-bx8se

    @Lovely-bx8se

    2 ай бұрын

    @@b_space_technology Bonjour, j'ai effectivement de base utilise le code fournis dans cette vidéo qui a très bien marché. Il est a noté que ma connexion est une Freebox de base sans paramétrage particulier ( port ou autre chose ) avec XAMPP sur ma machine de base. Ton message d'erreur ressemble beaucoup a une erreur concernant l'accès a la page PHP. As tu effectué les test de base de bonne connexion sur la page PHP?L'envois de valeur a partir de cette page sur MYSQL? Avant tous code avec esp.Si oui et que cela fonctionne, as tu bien suivis les conseils pour remplir le champ 44 const char* SERVER_NAME = '',peut etre il manque une lettre, un chiffre

  • @ZahidHasan-ky6oy
    @ZahidHasan-ky6oy Жыл бұрын

    Good job.

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    Many many thanks

  • @zhepty12
    @zhepty123 ай бұрын

    heplfull terima kasih..

  • @alfonso2ff
    @alfonso2ff Жыл бұрын

    Show!! It worked perfectly fine! However, it is necessary to alert to release the windows firewall for private networks, otherwise the database is not reached by ESP32. Other than that, congratulations and many thanks for sharing your projects.

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    Thanks for the info

  • @happymatekenya394
    @happymatekenya39410 ай бұрын

    You are a Goat

  • @kamalkamel7559
    @kamalkamel7559 Жыл бұрын

    niiiiiiiiiiice! thank you my freind

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    Thank you! Cheers!

  • @leerhoscht
    @leerhoscht11 ай бұрын

    Thx bro

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    welcome

  • @23mauxanh
    @23mauxanh9 ай бұрын

    LOVE U

  • @labandrick9240
    @labandrick9240 Жыл бұрын

    Great video as usual and I hope next video would be RFID attendance system v5 with xamp 😊

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    Coming soon!

  • @labandrick9240

    @labandrick9240

    Жыл бұрын

    @@AhmadLogs thanks that would be great 👍

  • @prabhakm5144

    @prabhakm5144

    Жыл бұрын

    @@AhmadLogs im having some doubts can u give ur mail id

  • @amanshrestha6528
    @amanshrestha65287 ай бұрын

    That really helped me a lot! Thank you very much for the video. I still have a question regarding this. So you showed us how to send dht data from esp32 over wifi network. Is it also possible that esp 32 can send data to xampp server over bluetooth?

  • @pascalime4276
    @pascalime42764 ай бұрын

    thanks a lot your videos is very helpful. However I have a little problem, the serial monitor prints 200 like you said and the websocket client received it well but the table that will store the data didn't create new record, also I refreshed the database but nothing showed what i might be making wrong?

  • @harishananthevarajah3131
    @harishananthevarajah31314 ай бұрын

    Thank you so much for the above video sir, but is it possible to make the ESP as an access point instead of station mode

  • @Mihce06
    @Mihce064 ай бұрын

    Thanks for this video. Would it be possible to get the HTTPClient library?

  • @syaifulannam
    @syaifulannam6 ай бұрын

    I want to ask. If I want to change the microcontroller with raspberry, are this running with different device?

  • @syaifulannam
    @syaifulannam5 ай бұрын

    Can i ask sir? I have project to make controlling temperature use AC dimmer and monitoring use max31855k, is it possible to send t temperature data to database? Thanks

  • @user-if1pe2ft1v
    @user-if1pe2ft1v5 ай бұрын

    Hello , Actually using this library HTTPclient is the synchronous method, because data send through HTTP POST it stuck CPU for sometime. Can you give some Asynchronous method.

  • @eternalxpectator
    @eternalxpectatorАй бұрын

    Hi There. So i have a problem. due to the nature of the project i have to use an Arduino Mega and i can't find a HTTPClient library that works with your code... any sugestions where to find it? Needless to say i'm a noob with little experience on programming...

  • @ECEpendi
    @ECEpendi5 ай бұрын

    Sir, what if I want to change it from localhost to the original server or vps server? thanks.

  • @S.drawing85
    @S.drawing8524 күн бұрын

    Thanks for this video . For the one step google tell me that : the request URL was not found on this server . Why ? Btw i do correctly all your steps , but i don't know where is the probleme . Can u help me ?

  • @KAVIYAPRABHAKMSEC
    @KAVIYAPRABHAKMSEC Жыл бұрын

    Can u plzz make tutorial about GPS with node mcu?

  • @user-wr4jh2xd5n
    @user-wr4jh2xd5n2 ай бұрын

    nice video , please can you provide us an example of a real time monitoring system based on dht11 , co2 gaz sensor mq135 and mq2 and a flame detector please i need some aid for my project

  • @Pn-lw8ox
    @Pn-lw8ox2 ай бұрын

    Can i use the same arduino ide code but use arduino uno rev4 WiFi , without esp32???

  • @raihanzaenalmutakin9144
    @raihanzaenalmutakin91448 ай бұрын

    ESP32 and localhost should have the same connection?

  • @hieuao2509
    @hieuao25097 ай бұрын

    can u do it with soilmoisture sensor

  • @fred_sonntag
    @fred_sonntag23 күн бұрын

    @ALL There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Thats why the code doesnt't work at many people!! Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @romnickidang3201
    @romnickidang32013 ай бұрын

    Can you make a tutorial for storing data in the database using fingerprint

  • @user-if1pe2ft1v
    @user-if1pe2ft1v5 ай бұрын

    one more thing is -1 or -11 Response code is received in between what is Reason for it??

  • @parvazno
    @parvazno Жыл бұрын

    that is so great may you explain how we could added another type of sensor like motion detect or siren or take picture with esp32cam and send to server with each motion detect? please extend this project to full other type sensor too. regrads

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    noted.

  • @user-hx5ge8ll4g
    @user-hx5ge8ll4g Жыл бұрын

    It was one great tutorial , can u plz do tutorial for sending temperature pressure data using LoRa 32 module and receiving data through LiLyGo lora 32 receiver and then send it to data base.

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    will try soon

  • @oshadhanirmana9761
    @oshadhanirmana97615 ай бұрын

    The requested URL was not found on this server. plz help

  • @ocean2523
    @ocean25234 ай бұрын

    call to 'HTTPClient::begin' declared with attribute error: obsolete API, use ::begin(WiFiClient, url) I am facing this error, please give solution

  • @rogeriohideki
    @rogeriohideki Жыл бұрын

    would you like to post a project controlling the buttons by mysql along with dht11 on the same page?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    yes I can, but give me some more detail

  • @jamesjsgaming9254
    @jamesjsgaming92544 ай бұрын

    There is an Error in HTTPClient.h its says No such file or directory

  • @charlesdesouza9313
    @charlesdesouza931310 ай бұрын

    The columns in myphpadmin stopped updating after I successfully uploaded the ESP32's code. Do you have any idea how to solve it? In a nutshell, I received the message that it worked with the messages in Serial.print were delievered to my serial monitor, but the data stopped being sent to the MyPHPAdmin.

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Thats why the code doesnt't work at many people!! Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @MariaAraujo-pt3cp
    @MariaAraujo-pt3cp Жыл бұрын

    Hi, I'm following your video but I got stuck in the 21:10 minute mark. I'm trying to validate my IP adress but i always get the HTTP ERROR 404. Do you know what could be the issue? Thank you!

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    hmmm. must connect the esp32 and your localhost machine to the same wifi network. TEST: connect the mobile phone and your localhost machine to the same wifi network. then test the ip address from your mobile phone browser to see if you can access the computer from your phone

  • @aadityaparmar5146
    @aadityaparmar514611 ай бұрын

    I am getting the compilation error that HTTPClient.h: No such file or directory. Tried to find the library in Git Hub but couldn't find any. Can you please share the library?

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    hmmm. install the latest version of esp32 board in arduino ide

  • @rahuls4479
    @rahuls44794 ай бұрын

    How to edit the web page

  • @sagnikmitra6584
    @sagnikmitra6584 Жыл бұрын

    Very well explained, I just need 1 more help. How can I send a setpoint value to this interface for controlling the temperature , say for example the temperature should work between 37 to 39 C. I do not want to send this condition in the Arduino code but as a simple txt file or csv file to the phpmyadmin and then check whether it is maintaining. Please do let me know

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    you can send the temperature data to the localhost server. and then The PHP script on the server will then receive the temperature data. it then check the condition "temperature is between 37 to 39 C", then you can perform specific action of the based of the condition true or false

  • @sagnikmitra6584

    @sagnikmitra6584

    Жыл бұрын

    @@AhmadLogs can you help me with the code and give atleast the skeleton?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@sagnikmitra6584 sure!

  • @sagnikmitra6584

    @sagnikmitra6584

    Жыл бұрын

    @@AhmadLogs got the program but what will the setpoint.txt contain, like I want to know what will be written there?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@sagnikmitra6584 the current temperature will be written in the file if within the range (37 to 39 C).

  • @user-vh5up1qc1r
    @user-vh5up1qc1r Жыл бұрын

    Hello, i have an error in the HTTPClient.h library, can you tell me which library you used?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    can you explain the error. It is a built in library. when you install the esp32 core it automatically installed. I am using the esp32 core version 2.0.3

  • @user-vh5up1qc1r

    @user-vh5up1qc1r

    Жыл бұрын

    @@AhmadLogs I already solve the problem. Thank you :)

  • @imditza
    @imditza4 ай бұрын

    can u give a linkt to httpclient lib?

  • @wasdaletimelapse7658
    @wasdaletimelapse76583 ай бұрын

    Hi Friend, First let me say that your vide is very good and very easy to follow for a relative newcomer to PHP and Sql. It gives lots of steps and chances to confirm progress throughout the video. I have followed your video to the letter yesterday and all went great until the final step. I have a LAMP server set up on a Raspberry Pi4 and I am using an ESP32 to supply sensor data. The problem I am having is that the (postData) variable does not seem to be accepted by the server. I have tried with two tables in the same database and different types of data but with no success. When I monitor the output of the ESP all looks fine and matches your output exactly. I do get a connection response from the server but no data entry into the database. I have spent hours searching for a solution but I don't have the experience or knowledge to now exactly what I am looking at. I do hope you can help me. Thank you in advance.

  • @dmbeater2853

    @dmbeater2853

    3 ай бұрын

    Hello partner, I had the same problem and finally I have solved it. Please check the comments box and look for my comment where I explain what I did. As well as you, I had to expend many hours to do it. Hope it helps you :D

  • @wasdaletimelapse7658

    @wasdaletimelapse7658

    3 ай бұрын

    Hi, thank you very much for your reply. I somehow found my way to your explanation earlier today but now I can't remember how I got to it. could you please tell me how to find your comments. Thank you so much.@@dmbeater2853

  • @wasdaletimelapse7658

    @wasdaletimelapse7658

    3 ай бұрын

    Hi, I cannot find your comments. Please help. Thank you.@@dmbeater2853

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Thats why the code doesnt't work at many people!! Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @wasdaletimelapse7658

    @wasdaletimelapse7658

    22 күн бұрын

    @@fred_sonntag Hi, thanks for the response to my comment. I gave up on this project long ago as I was wasting too much time on it. My limited knowledge of this sort of thing means that I don't even know what your solution is, but thanks anyway. It might help someone else who has the same issue as many others.

  • @nosagigawidiansyah4016
    @nosagigawidiansyah4016 Жыл бұрын

    Hello good videos! easy and simple to understand but i have issues why i can't get warning "New record created successfully" just connection database is OK? please help me because i use ur code for my thesis, thanks for yout help :)

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    have you checked in the database? see if data is stored in the table or not. use the same table name that I have used

  • @menardcaponpon9152
    @menardcaponpon91529 ай бұрын

    hello sir in my case the isset part is not working on mine so the data cannot be displayed in the database whta should i do sir this is for the project in my school appreciate a lot if you reply

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Thats why the code doesnt't work at many people!! Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @wafoguyleonard4106
    @wafoguyleonard4106 Жыл бұрын

    Hello I did exactly like that. I have on serial monitor "database connection is OK" but new record is not created and the message does not appear on serial monitor. What xan be the problem please?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    test the php file directly from the localhost to test if the data is stored in the database or not

  • @jeremiahcruz6854

    @jeremiahcruz6854

    Жыл бұрын

    ​@@AhmadLogshi I have the same problem. I already tried sending data from php directly to mysql and it was stored successfully. What should I check next?

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Thats why the code doesnt't work at many people!! Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @sidsingh5446
    @sidsingh5446 Жыл бұрын

    Sir can u please retrive the humidity data from the database and perform some task like if humidity data is greater than 40 degree red led will glow

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    It is possible I will try to make a video on it soon

  • @sidsingh5446

    @sidsingh5446

    Жыл бұрын

    @@AhmadLogs thank u sir

  • @a-21_chaudharibhavesh79
    @a-21_chaudharibhavesh7911 ай бұрын

    similarly how can i send npk value to mysql?

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    can you explain "npk value"?

  • @carlosmiguelzucherato2212
    @carlosmiguelzucherato2212 Жыл бұрын

    Hi your video was very helpful for me!! But unfortunately my httpCode returns "httpCode: -1". My Apache and MySql are running and the IP is correct, Don't know waht to do :/

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    It is strange the project is still not working. is there any firewall blocking the apache or mysql?

  • @carlosmiguelzucherato2212

    @carlosmiguelzucherato2212

    Жыл бұрын

    @@AhmadLogs no, it has full access, i even redownloaded xampp and still nothing

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@carlosmiguelzucherato2212 httpCode is returning -1, it typically indicates a failure in establishing a connection to the server. Here are a few things you can check to troubleshoot the issue: 1. Verify the server's IP address: Double-check the URL variable in your code to ensure that it contains the correct IP address 2. Check network connectivity: Ensure that your micro-controller is connected to the network. 3. Firewall or antivirus settings: Check if any firewall or antivirus software is blocking the connection. Temporarily disable them and see if it resolves the issue.

  • @yudimulyadi6201
    @yudimulyadi620111 ай бұрын

    Il try and succes until payload : database connection OK But not send data to database mysql, can you help?

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    any error displayed in the serial monitor? give me some more detail

  • @eduardodaveigabilibio8408

    @eduardodaveigabilibio8408

    7 ай бұрын

    I also have this problem, did you manage to solve it?

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @ShawankumarParida
    @ShawankumarParida11 ай бұрын

    How to store data in a SD card that is connected to esp32 with a sd card module?

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    I will try to make a video on it

  • @korjdeguzman8621
    @korjdeguzman86213 ай бұрын

    the code is good but it is not proceeding in sending the data in database. There is no error showed but it is not sending the data in database. How to solve that issue? thanks It just showed 'Database connection is ok' in payload no 'new record created successfully ' help me pls

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Thats why the code doesnt't work at many people!! Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @maharjanrazib
    @maharjanrazib Жыл бұрын

    Great Tutorial,but I cannot find HTTPClient Header file, can you help me?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    it is built-in in the esp32 core you not need to install it separately

  • @santiagoespitiatorres2705
    @santiagoespitiatorres2705 Жыл бұрын

    HI i made the same steps but my esp32 does not reach the database, what can be the problem?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    what error display in the serial monitor

  • @santiagoespitiatorres2705

    @santiagoespitiatorres2705

    Жыл бұрын

    In the payload part doesn’t show “new record created successfully” he can’t reach the database

  • @sjaycreations1086

    @sjaycreations1086

    Жыл бұрын

    same problem - ( httpCode: -1)

  • @ZahidHasan-ky6oy
    @ZahidHasan-ky6oy Жыл бұрын

    Please make a rfid portable attendance system with web admin login page.

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    noted.

  • @user-wr8ln1ru5f
    @user-wr8ln1ru5f Жыл бұрын

    you didn't explain how to download the HTTPClient library, the one found in the arduino library manager isn't working

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    HTTPClient is the built-in library in the esp32 core. you do not need to install it separately.

  • @srinugovindas9781
    @srinugovindas9781 Жыл бұрын

    Hii Iam doing project right now. My project title is automatic door opening system using pir sensor. For this project, iam using Arduino uno, esp32 and php(xampp server). I wrote the codes for this, Arduino uno code working and esp32 wifi is connected but the data is not stored into the mysql table, what is the problem can u tell me please??

  • @srinugovindas9781

    @srinugovindas9781

    Жыл бұрын

    Can u send your email id , I will send u the full details about the project. It's very urgent

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    I will soon create part two for this video. hope it will solve your issues.

  • @srinugovindas9781

    @srinugovindas9781

    Жыл бұрын

    @@AhmadLogs How much time it will take, it's very urgent iam doing project right now. I need to submit by tomorrow. I already try some coding I will send u, please provide your email id

  • @srinugovindas9781

    @srinugovindas9781

    Жыл бұрын

    Please sir help me!

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@srinugovindas9781 upload the code on github and share the link here. I will check that

  • @monishraju4789
    @monishraju4789 Жыл бұрын

    Hiii sir. I couldn't send the data to the database. What i have to do ? Can you help me?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    give me some more detail about the issue. what error display in the serial monitor

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Thats why the code doesnt't work at many people!! Connection to Database is succesful, but no Dataset is written. When you fix it, it will work properly!

  • @pranadityasudana7514
    @pranadityasudana751410 күн бұрын

    Data : temperature= 50&humidity= 50 23:40:25.663 -> httpCode : 200 23:40:25.663 -> payload : 23:40:25.663 -> Fatal error: Array and string offset access syntax with curly braces is no longer supported in C:\xampp\htdocs\Weather_Station_Project\test_file.php on line 18

  • @pranadityasudana7514

    @pranadityasudana7514

    10 күн бұрын

    nvm i got it

  • @memesdealer6178
    @memesdealer6178 Жыл бұрын

    my esp8266 won't reach mysql database, any suggestions?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    post the serial monitor output here, to figure out the issue

  • @memesdealer6178

    @memesdealer6178

    Жыл бұрын

    @@AhmadLogs [HTTP] GET... failed, error: connection failed ; httpCode: -1 ; payload :

  • @sidsingh5446
    @sidsingh544611 ай бұрын

    Sir i want to print the sql database data to my arduino serial monitor. Is it possible. Hoe can i make this

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    It might gives you some help. kzread.info/dash/bejne/l3qcsc6ThKnfopc.html

  • @sidsingh5446

    @sidsingh5446

    11 ай бұрын

    @@AhmadLogs sir please make a complete project on scanning the rfid and the rfid data will match with the sql database in which rfid data is stored. And if the rfid matched with the stored one then open the gate and green led will glow. Otherwise red led will glow

  • @sidsingh5446

    @sidsingh5446

    11 ай бұрын

    There is no video which help me to fetch the data from sql database and print that data to arduino serial monitor using ethernet module or wifi module

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    @@sidsingh5446 will try soon

  • @ShamimAhmed-rj9kr
    @ShamimAhmed-rj9kr Жыл бұрын

    Please make an rfid attendace system with xampp server

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    soon

  • @jhey-nyt6206
    @jhey-nyt6206 Жыл бұрын

    i got httpCode: -1 what is wrong with this?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    verify your ip address

  • @agung3h
    @agung3h11 ай бұрын

    Arduino code Serial.begin(115200); Iam using this code, and after upload is OK then, i am open serial monitor. But, it only shows ?????

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    have you select the correct baudrate from the bottom right corner of the serial monitor?

  • @agung3h

    @agung3h

    11 ай бұрын

    OK thanks

  • @agung3h

    @agung3h

    11 ай бұрын

    Now, i get error when try to send data from arduino if(isset($_POST["pressure"]) && isset($_POST["temperature"])) { $p = $_POST["pressure"]; $t = $_POST["temperature"]; $sql = "INSERT INTO wemosd1 (pressure, temperature) VALUES (".$p.",".$t.")"; after i change value to this code, the data base is not create new data. And it only show "Database connection is OK"

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    @@agung3h use print_r($_POST); at the top of the php file. to see what is inside. $_POST["pressure"]. the issue is with this "pressure" in the POST array. have you set the pressure in the esp32 code? the new code for testing: print_r($_POST); if(isset($_POST["pressure"]) && isset($_POST["temperature"])) { $p = $_POST["pressure"]; $t = $_POST["temperature"]; $sql = "INSERT INTO wemosd1 (pressure, temperature) VALUES (".$p.",".$t.")"; } test it and let me know

  • @agung3h

    @agung3h

    10 ай бұрын

    @@AhmadLogs After use your suggestion code, it show Database connection is OK Array ( )

  • @abhradipdas4998
    @abhradipdas499810 ай бұрын

    Data base is connected but could not add new record

  • @fred_sonntag

    @fred_sonntag

    23 күн бұрын

    There is an Mistake on 26:56 in this tutorial - the header must written BEFORE postData, not AFTER - Connection to Database is succesful, but no Dataset is written. When you fix it, it will work

  • @syakilla1510
    @syakilla1510 Жыл бұрын

    Hi thank you for this video. It is an amazing videoo. I am wondering how to send the data to the website and make it visualize. At which part need to modify and how? Hopee that you willl notice this comment and able to respond to this. Thank you!

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    for sending data to website you need to upload the php files on the website, and change the following with the hosting provider credentials. 1. database username 2. database password 3. database name 4. database table name you might watch this video to send data to website. kzread.info/dash/bejne/lYuaytKgeZiZeKw.html

  • @syakilla1510

    @syakilla1510

    Жыл бұрын

    @@AhmadLogs Okay thank you. Will try to do this soonn

  • @nehamiglani1498
    @nehamiglani1498 Жыл бұрын

    I can see 'database connection is ok' but not 'New recorded successfully'. Can you please see this code and tell me where I am going wrong, because I urgently need this for my project

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    ok. you can use the print_r($_POST); function to see if there is any "temp" data. print_r($_POST) will display all the data in the $_POST array. run the code below and see what display in the serial monitor

  • @nehamiglani1498

    @nehamiglani1498

    Жыл бұрын

    @@AhmadLogs Thank you so much! It was of great help. You literally make the best videos.

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@nehamiglani1498 thank you so much

  • @yudimulyadi6201

    @yudimulyadi6201

    11 ай бұрын

    @@AhmadLogs I Have same problem, but i try to print_r, i see array dont have any more, can you help to find my mistake ?

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    @@yudimulyadi6201 it means the data is not posting to localhost. have you see any error in the serial monitor?

  • @prapatsornnarmhung7256
    @prapatsornnarmhung725611 ай бұрын

    my error is : Warning: mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES) in C:\xampp\htdocs\iot_project\connect.php on line 8 Connection failed: Access denied for user 'root'@'localhost' (using password: YES) So I solved the problem by typing mysql -u root -p on command this is result -> C:\Users\edite>mysql -u root -p Enter password: ************** ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I don't know how to solve it. please help me. Thank you so much!!

  • @user-cy2hq2zu6q

    @user-cy2hq2zu6q

    11 ай бұрын

    I have this problem too. Sir, Please save our life😭😭😭😭

  • @AhmadLogs

    @AhmadLogs

    11 ай бұрын

    test with the default username : root and leave the password blank. then let me know.

  • @user-cy2hq2zu6q

    @user-cy2hq2zu6q

    11 ай бұрын

    ​@@AhmadLogs I already fix my problem, Thank you so much!!!

  • @suryakiran1325
    @suryakiran1325 Жыл бұрын

    I'm trying to compile your .ino code as per the instructions shown in the video...I'm using esp32 and dht11 sensor. Installed arduino sensor library 1.4.4. I'm getting HTTPClient.h not found error while compiling the program in arduino. Please help.

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    Have you selected the ESP32 board from the Tools menu in the Arduino IDE? The HTTPClient.h library is already included in the ESP32 core, so there is no need to install it separately.

  • @suryakiran1325

    @suryakiran1325

    Жыл бұрын

    @@AhmadLogs yes, sorry I forgot to mention that it is done now...just restarted the PC and error is gone now....anyways thanks...☺️👍

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@suryakiran1325 sounds good!

  • @anupammaji7257
    @anupammaji7257Ай бұрын

    Ip adress/dht11_project/test_data.php not working

  • @cmylc657
    @cmylc657 Жыл бұрын

    Hello Sir . I am having this problem " [HTTP] GET... failed, error: connection refused ///httpCode: -1 payload : //// " . I successfully sent test data to database via php.data however I have couldn't send it to the database by arduino . Can you help me please ?

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    make sure your apache and mysql server are up and running. just restart the apache and mysql. I think It will solve the issue

  • @omarnurhidayat4320

    @omarnurhidayat4320

    Жыл бұрын

    @@AhmadLogs i have same problem with him, and i already restart my apache and mysql but still nothing happened sir

  • @AhmadLogs

    @AhmadLogs

    Жыл бұрын

    @@omarnurhidayat4320 then again check your IP Address, also verify that you have entered the correct IP address in the code. just verify it and let me know