Closed NickNothom closed 3 years ago
Hey, thanks for the PR! This is good work - follows the implementation pattern exactly. You'd need to adapt it a bit to the new code base of the new Watney, though, but that shouldn't give you trouble.
Before we merge it in, I think it needs more description, or a "how to". This code, at the end of the day, just turns a GPIO pin high or low. What LED strip did you use? How did you hook it up? How did you mount it onto the rover?
Closing, as the new version of watney will have headlights
These are the changes that I made to allow turning on and off some infrared headlights on Pin 26 of the Pi Zero. I just used a simple transistor to switch them because the lights consume quite a bit of current.
Pressing L toggles the lights on and off, and they automatically turn off on boot.
Feel free to change anything you want, my implementation here might not be the best.