I’m very new to arduino, I started with simple project’s, of course, but now I took on a school project that I’m doing at work but I could use some help to point me back in the right direction.
The thing I want to do is when you lock your car door the mirrors go in, and when you put the ignition op the mirrors should go back in the drive position.
There is already a module that turns the mirrors in and out, it gets a pulse from a button. push the button and they go in. push it again and they go back out.
I will use the door locking signal that comes from the remote to turn the mirrors in.
But when you start driving the doors will lock so I can only use this signal when the ignition is off.
When you turn on the ignition the mirrors should go back in the driving position but only when you turn it on. because you should be able to use the normal, existing, button to move the mirrors. so if the mirrors always go in with the ignition on this will not work any more.
That is why I need a counter of some short to know the position of the mirror, also that counter needs to know if the button is pressed what the new position is, and remember this data until it changes to a new value.
I’m working on this project for some time now, I tried many different things, but non of them work. That is of course the reason I’m here. In the hope I could get some help.
I will attach the program that I have now and I hope you could take some time to help me out here.
spiegelnieuwsteversie.ino (1.74 KB)