I try to upload the code but its giving me error no connection established
I moved your topic to an appropriate forum category @rtariq895.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
This is an important part of responsible forum usage, as explained in the "How to get the best out of this forum" guide. The guide contains a lot of other useful information. Please read it.
Thanks in advance for your cooperation.
Which COM port did you select? Which COM ports do you have available? If you go to the Device Manager in the Win control panel, what description do you see for your COM port(s)?
Have you tried connecting to the Arduino with only the Arduino plugged into USB and nothing else plugged into the Arduino board?
Hi @rtariq895. I'm going to ask you to post some additional information that might help us to identify the problem.
This procedure is not intended to solve the problem. The purpose is to gather more information.
Please do this:
- Select File > Quit from the Arduino IDE menus if it is running.
All Arduino IDE windows will close. - Start Windows "File Explorer".
- Open the Arduino IDE installation folder.
ⓘ The default installation location is at one of the following paths:-
C:\Program Files\Arduino IDE
-
(whereC:\Users\<username>\AppData\Local\Programs\Arduino IDE
<username>
is your Windows username)
If looking for it with your file manager or command line, note that the
AppData
folder is hidden by default. On Windows "File Explorer", you can make it visible by opening the "View" menu, then checking the box next to "☐ Hidden items".
-
- In the folder listing of the Arduino IDE installation folder, hold the Shift key while clicking the right hand button on the mouse.
- From the context menu, click "Open PowerShell window here".
Windows PowerShell will now open with the current directory set to the Arduino IDE installation folder. - Type the following command:
& ".\Arduino IDE"
- Press the Enter key.
Debug output should now be printed to the PowerShell window as Arduino IDE starts. - Wait for Arduino IDE to finish starting.
- Attempt to upload your sketch again, just as you did before.
- Wait for that "
No connection established
" error to occur. - Switch back to the PowerShell window.
- Press the Ctrl+Shift+A keyboard shortcut.
This will select all the text in the PowerShell window. - Press the Ctrl+C keyboard shortcut.
This will copy the contents of the PowerShell window to the clipboard. - Open a forum reply here by clicking the "Reply" button.
- Click the
<CODE/>
icon on the post composer toolbar.
This will add the forum's code block markup (```
) to your reply to make sure the error messages are correctly formatted.
- Press the Ctrl+V keyboard shortcut.
This will paste the output into the code block. - Move the cursor outside of the code block markup before you add any additional text to your reply.
- Click the "Reply" button to post the output.
Please let me know if you have any questions or problems while following those instructions.
I'm going to guess that you connected the DHT11 wrong. Check the pinout; I think you've mirrored it (switched GND and Vcc), but it's hard to tell with the relevant connections hiding behind a USB cable:
Should be like this:
Thank you so much
You're welcome.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.