nikivanov / watney

Watney is a low-cost 3D-printable FPV rover
GNU General Public License v3.0
378 stars 39 forks source link

Add Headlight Support #13

Closed NickNothom closed 3 years ago

NickNothom commented 4 years ago

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.

nikivanov commented 4 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?

nikivanov commented 3 years ago

Closing, as the new version of watney will have headlights