ESP32-WROOM mmwave setup help

hello! i have very specific question to ask , i was watching everything smart home (this video Building My Perfect Smart Home Presence Detection Sensor! - YouTube) and he used the code from (mmWave Presence Detection - ESPHome style) to get his mmwave sensor working and im trying to do the same but im confused, the pin-out of the board and the way he soldered it out shouldn’t work but his does, he put the sensor in i022, i021, i017, i016, and of course GND and VCC (5v) but on the df robot page it says you need the rx and tx to be plugged in, im wondering how i can do the same as him and get my sensor working, i hope someone can help because im at a loss, i wish he could have shown the install of the code :frowning: im still kinda new too all of this but kinda wanted a project to mess around with, any help will be greatly appreciated!

I am on my phone so hard to do a thorough check but I think you will find that 16 and 17 are assigned to TX & RX. As far as I know on the ESP32 you can pick nearly any pin and assign it to a UART, and the chip will internally associate the pins with a hardware UART if available otherwise default to an emulated one.

I have the sensor and will soon be doing the same…

1 Like

Yep this was the fix! Thank you! I didn’t understand what was happening so thank you so much

1 Like

so come to find out i think my sensor might be bad, i changed the code to the different pin names and im not getting readout in the logs, i have a new sensor coming tomorrow hope it works

Keep in mind that TX and RX have to be swapped (sensor TX to ESP RX, and so on). Try that… just swap pin numbers in the code and see if it works.

“”
substitutions:
device_name: test

This will vary based on your board uart_tx_pin: 1022

This will vary based on your board uart_rx_pin: 1021

This will vary based on your board

gpio_pin: 1017

(Optional) Path to the leapmmw_sensor.h file relative to your esphome configuration directory. header_file: leapmmw_sensor.h

packages:
remote_package:
url: GitHub - hjmcnew/esphome-hs2xx3a-custom-component
ref: release
file: packages/leapmmw_sensor.yml
“”

this is what i had before edited on the esp bored and i didn’t get an error but just nothing was happening
‘’
substitutions:
device_name: test

This will vary based on your board uart_tx_pin: 1021

This will vary based on your board uart_rx_pin: 1022

This will vary based on your board

gpio_pin: 1017

(Optional) Path to the leapmmw_sensor.h file relative to your esphome configuration directory. header_file: leapmmw_sensor.h

packages:
remote_package:
url: GitHub - hjmcnew/esphome-hs2xx3a-custom-component
ref: release
file: packages/leapmmw_sensor.yml
‘’

this is what i changed it too and i get this error

maybe i have the files in the wrong place and don’t have a good install? btw thank you for the help

It’s just 16, 17, 21 and 22. What you write as I0 ( i zero) or 1 0 (one zero) is actually IO ( i o) for input-output so you could also write GPIO16 (but no reason to that I know of).

GPIO = General Purpose Input Output

1 Like

yeah the sensor is toast but i did get the code in correctly! thank you so much for your help you are a miracle worker! i googled and found out that this sensor has an led that should be on and mine is not, i have even completely flashed the board with the changed code and the led isn’t working, but i do have a new one on the way so i will let you now how it goes :heart: thanks again for the help

1 Like

i am not trying to be annoying but i just got the new sensor got it soldered in the led works but i got this message after install and was wondering why it might be doing this, and i am still not getting any readouts on sensor data, i have tried to swap the pi numbers and everything still to no avail

nvm i fixed it had to change the gpio pin to 17 and that did the trick

You are not annoying :slight_smile: The forums are for all of us to help each other and to learn from each other. I benefitted from many other users helping me, and am just trying to give back :slight_smile:

The purple logs seem ok, I did not see anything indicating an error. When you say you see no readouts, where are you looking? Did you add the ESP32 to HA? What do you see within the device page on HA?

I guess I should add my mmwave sensor to one of my ESP32s sitting here on my desk so I can follow along better. If this is your first time working with ESPHome, you did pick a much tougher starting project as it is my understanding that this sensor has a lot of configuration options. I started off with more basic I2C devices.

Edit: saw your edit. Glad you got it working!

thank you so so much for the help, im up and running now just tuning the sensor atm, i honestly couldn’t have done it without your help thank you!

1 Like