Looking to power Arduino off a car 12v power source. The desired behavior is to have the servo at position 0 by default. Then, when brake is pressed sends the servo to 180. What is the best way to approach this?
The only real problem is developing a signal that can inform you Arduino that the brake has been pressed. Everything else is easy.
Except maybe the power supply, which in an automotive environment takes a bit of care.
So start with how are you going to detect the brake? You monitor the brake light voltage, which would just need some isolation and/or level shifting.
You could start by getting the servo to do what you want just on your workbench with a pushbutton instead of the real signal.
If you haven’t already.
Oh, welcome to the community.
a7
Perhaps think along the lines of opto isolator for your signal source.
Pay to remember the brake switch is more than likely in the earth return line.