I apologize if my question is confusing, but I made a distance sensor code that takes the distance at each reading, and the way I have been resetting it is by pressing the button on my Arduino Uno.
However, I have a button of my own and was planning to use that to reset the program at each press. I currently have Digital Pins 0, 1, and 13 free. My Analog pins are also free to use.
Would it be possible to do this? If so, how would I be able to make these connections?
The schematic of the Uno is available online.
the way I have been resetting it is by pressing the button on my Arduino Uno.
Why do you need to reset the Uno ?
This is almost certainly a X-Y problem. You have a solution to a problem and you want help with that solution, but it is hard to help cause we do not know anything of the problem.
Almost always when a user wants to programmatically reset the Arduino it is the result of not understanding how the code should work. Post your code. Tell us what the code actually does and how that differs from what you want.
Read the how get the most out of this forum sticky to see how to properly post code. Remove useless white space and format the code with the IDE autoformat tool (crtl-t or Tools, Auto Format) before posting code in code tags.
Confusing for sure. If you want to reset the sensor, control its power source with a relay, transistor or FET. Then you can power cycle it at will and use any free pin you like. Just a SWAG but it sounds like your code is in setup(). If so you need to restructure it and place it in loop(). A schematic, not a frizzy thing, and links to the parts would help.
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.