i am very new to arduino, and i am currently waiting for my board to arrive so i can start tinkering away with it, and i am quite happy with the versatility of it after looking at example programs and projects, because i completed a few computer science courses in C/C++.
Im sorry if some of this may be redundant but i haven’t had time to test these answers and i can’t find anything about them.
From what i can tell the Setup function is executed once and that is done upon the arduino receiving power? Is there a way to do a power down sequence?
Example that im talking about:
Im looking to create a cover that opens up in my car, upon it starting (this is where the setup portion comes in). So the arduino would automatically execute the code to raise the cover, once power gets to the arduino
and just as the opposite (which is where my main question is) i would like to make it so that when the power to the arduino is cut (by the car turning off)… to be able to close the panel, and then the arduino shut down. Here is where im looking to take suggestions on how i could achieve this “power down” type of sequence.
One thing i do know.
There is a steady power from the battery(although i heard this depends on the car, but i checked for my car and it does have it ), and there is a power that is only on when car is on.