Assistance needed with coding for project

I have been trying to start programming my esp32 board (with little/no success) and wondered if someone could help me with a few problems that I am having with Arduino ide when trying to program an esp32 board with a bmp280 sensor.

  1. When I try to upload the any ketch to the esp32 it says “fatal error occurred: failed to connect to esp32: timed out.
  2. I am currently using the bmp280test example sketch from github but need to add some extra on the bottom, unfortunately I don’t really know what I am doing, so wondered if you could help me add on to the end of the scorch to make the esp32 to use the pressure reading from the bmp280 to do something like this: PRESSURE (in PSI rather than hPa)>(any number imputed via WiFi. E.g. 12.5) = YES/NO

Thanks, Kieran

When you plug the ESP32 into a USB port, what com port is the ESP32 on in the Arduino IDE?

Program what exact board? Program with what connection? How is that sensor connected? What is your power supply?

Idahowalker: When you plug the ESP32 into a USB port, what com port is the ESP32 on in the Arduino IDE?

An ESP32 doesn't have USB by itself - you're assuming some kind of development board. A very sensible assumption, but not mentioned by the OP.

When I plug the esp32 into my computer via micro usb to usb cable the only port available is COM 1.

The board is an ESP32 (board library from GitHub - espressif/arduino-esp32: Arduino core for the ESP32 )
connection: micro usb to usb cable from board to computer.
Power supply: when the board is plugged in via usb the red might turns on so that must be the power supply as well.

Sensor connected:

BMP280 (Sensor) ESP32 (Board)

VCC—————————3V3 Gnd—————————Gnd SCL—————————D22 SDA—————————D21

Kayk24: When I plug the esp32 into my computer via micro usb to usb cable the only port available is COM 1.

The board is an ESP32 (board library from https://github.com/espressif/arduino-esp32 ) connection: micro usb to usb cable from board to computer. Power supply: when the board is plugged in via usb the red might turns on so that must be the power supply as well.

If you unplug the ESP32 board, there is still only COM1? If that's the case you will need to solve the issue as to why your ESP32 does not show up in the Arduino IDE comm port listing. Have you followed the numerous available instructions on the internet on how to add on the ESP32 (core) to the Arduino IDE, or did you just get it and plug it in to find it does not work?

If the board is unplugged the only port is still COM1. I have tried numerous different tutorials for download the esp32 core, the software from github has downloaded fine just the same error message each time: Connecting .....__.....__ Timed out waiting for esp32. Failed to connect

So your ESP32 is not connecting.

Better sort that out.

How can I fix that then?

Update the Arduino IDE so that it knows how to communicate/program the ESP boards.

USB port not found.

Don't think the Arduino IDE can figure out this one! :astonished:

Kayk24: How can I fix that then?

I don't know, I not had an ESP32-WROOM or ESP32-WROVER fail to connect after following the ESP32 install guides on the internet.

Frankly, I'd test with another ESP.


I do not plug the ESP32 directly into a computers USB port. A look at the schematic of the ESP32 shows that what happens with the ESP32 happens to your computer, if connected. I power the ESP32's through a powered USB port/hub.


When you followed the instructions for installing an ESP32 to Windows machine Arduino IDE, did you a)follow this instruction, b)ignore it, c)did not follow any of the instructions:

Select the Port (if you don’t see the COM Port in your Arduino IDE, you need to install the CP210x USB to UART Bridge VCP Drivers):

?

@Kayk24

Other post/duplicate DELETED Please do NOT cross post / duplicate as it wastes peoples time and efforts to have more than one post for a single topic.

Please READ THIS POST to help you get the best out of the forum.

Bob.

Sorry, Does anyone know how to find COM2 and/or COM3 in the ports list. Currently I only have COM1?

See section on drivers.

Please READ THIS POST to help you get the best out of the forum.

SIMPLE TROUBLESHOOTING.

These steps may also save you some unnecessary time and effort in the forum.

  • Always provide as much detail as possible to your issue it may be important.
  • If applicable provide your SKETCH inside CODE TAGS ( </> ) or a CREATE share link.
  • If applicable provide a schematic even if hand drawn.

COMMON ISSUES

  • Check you have a COMMON GROUND where required.
  • Where possible use USB 2.0 ports or a USB 2.0 POWERED HUB to rule out USB 3.0 issues.
  • Try other computers where possible.
  • Try other USB leads where possible.
  • You may not have the correct driver installed. CH340/341 or CP2102
  • There may be a problem with the board check your wiring first.
  • Remove any items connected to pins 0 and 1.

COMPUTER RELATED

  • Ensure you turn off any additional security / antivirus just to test.
  • There may be a problem with the PC try RESTARTING it.
  • You may be selecting the wrong COM port.
  • Avoid cloud/network based installations where possible OR ensure your Network/Cloud software is RUNNING.
  • Clear your browsers CACHE.
  • Close the IDE before using any other serial programs.
  • Preferably install IDE’s as ADMINISTRATOR or your OS equivalent

Performing the above actions may help resolve your problem without further help.

Bob.

I am going to focus on one point in the answer which was deleted, but echoed in ballscrewbob's post (and Idahowalker's).

The mystery "ESP32" which has never been cited, most likely uses a CH340 Chinese-designed USB to serial interface chip which Windoze (unlike Linux) does not natively support. You probably need to (firstly, read the instructions for the ESP32 board and then) install the corresponding USB driver.

Fundamentals Is the ESP32 path in preferences ? Is the EXACT board selected in board mansger? Does it list in the IDE? bottom right. Can you use any other boards? NANO. UNO ETC? what happens when you plug any board DIRECTLY to the PC. NOT using the hub?

As I am a total beginner to Arduino and don’t think I will have to use it again after this project, is there anyone who I could get to do the coding for my esp32 for me?

If you cannot manage to connect the ESP32 to your PC, then coding for it is always going to be futile, so no! :astonished:

Because you would actually have to send the ESP32 to one of us to have it programmed, and send it back to you! :cold_sweat: