1

I am using the TeckNet® C016 USB HD Webcam, 720p (Link) with 6 LEDS. While connected to the Pi, the LEDs are always ON. The only way to toggle the LEDs is by turning a wheel (similar to Volume Control on Headphones).

I'm only taking one Picture every Hour and for the pictures I want the LEDs ON, the rest of the time I want them OFF.

Is there a way to "unplug" the webcam by code and "plug" it in again before the script for taking the picture starts? I don't think I can directly toggle the LEDs since they can only be controlled via wheel.

Specs: Raspberry Pi 2 Model B

PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"

I might have to add that there are several USB Devices connected to the Pi and that I would like to have them connected the whole time.

Peter S
  • 625
  • 1
  • 9
  • 32
  • 2
    Programmatic on/off of USB power seems to be supported in certain kernels but not all. You could try some of the suggestions [here](https://stackoverflow.com/questions/4702216/controlling-a-usb-power-supply-on-off-with-linux) and [here.](https://unix.stackexchange.com/questions/165447/turning-off-power-to-usb-port-or-turn-off-power-to-entire-usb-subsystem) I did the same thing once, i.e. turned a webcam on/off from a script, but that was in hardware via GPIO. You could do that too (cut open the USB-cable or get an adapter so you can break the power or ground line with a transistor or mosfet) – jDo Mar 24 '16 at 11:56

0 Answers0