-
Notifications
You must be signed in to change notification settings - Fork 7.6k
pinMode function not working @esp32 devmodule #641
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Variables duration and distance are defined as |
I don't think that could be the problem because same code is working perfectly for Arduino UNO and Sparkfun esp32 things. |
Could you also pass your backtrace through the Esp Exception Decoder ? It would help for further analysis maybe as to why pinMode failed, it shouldnt happen though. |
I will try both and respond ASAP |
Why are you using GPIO 6 & 7? Those are used by the flash SPI. There are about 20 other pins to choose from :) |
I tried on different pins it was Priti much same result. |
there is no reason why code would work on Sparkfun Thing and not on any other ESP32 based board, given that you have chosen the correct pins. They are all basically the same thing ;) ESP32 chip on all of them. |
After last Commit I recompiled my code and it did not set the selected pins HIGH when supposed to ? |
so you did not rebuild after updating to the latest code and just reflashed the board? The IDE might not have picked up the changes, thus flashing something wrong, but when you changed the board it actually recompiled everything and that is why it worked. ArduinoIDE is a bit weird :) |
I did rebuild but as you say Arduino is a bit weird sometimes, might have been some cache issue or something anyway it works ! |
Hmm after all the suggestions and few Trial and error I got these sensors to work but except any of flash pins so to use ultrasonic sensors I cannot use any of flash pins gpio6,7,8,9,10,11 and input only pin other than that they are working. |
is there any way I can use this flash pins as GPIO pins? |
not really ;) you might be able to free two of them if you set mode to DIO or DOUT (9 and 10 I think) but I really do not recommend you to attach anything to the flash pins or you might break everything ;) Did you run out of pins? |
yes I am running out of pins |
GPIO expanders are your friend in this situation. I am used them in multiple projects and they work with SPI or I2C to give you the extra pins you need. There are several that aren't too expensive. |
@Akskaypohankar IS there any update on this or can we close the issue? |
let's close I got other alternatives |
hello guy's i am trying to hook ultrasonic sensor to esp32 programming in Arduino but it is not working things happens like this.
can any one help me
code used
later I uploaded same code to SparkFun things(esp32board) and it worked without any error
but I need this to work on my esp 32 dev kit please help.
The text was updated successfully, but these errors were encountered: