I have been struggling for the past few days understanding what was wrong.
Anyhow I'm working on a project that uses hall sensor, what's weird about this, is that the script use to work and that the hall sensors were working correctly.
I left the project aside for a month and when I come back it was no working anymore. I'm 100% sure that the code is right because it was working in the past and many people use the same code.
I double checked everything hardware wise, and I use vs code to upload the code into the ESP32.
Here's the weird thing, if I run the code the hall sensor don't work however if I plug the ESP32 into the computer and run it with the monitor tool of platformio.io everything works.
I'm not an expert and I can't find a solution I hope somebody here have an idea. Maybe the monitor uses a different firmware? I really need help.