GPIO classes for controlling GPIO pins and PWM

Using WiringPi (gpio command) for PWM and
sysfs control using file descriptors for control of pin read/write

Requires a tweak to the Pi SD card image to install gpio

Includes a bash script to turn LEDs on and off

Change-Id: Iaa254e026db336b09758d24eb1ddcffccfb27655
Signed-off-by: Jim Ostrowski <yimmy13@gmail.com>
diff --git a/y2022/vision/camera_reader_main.cc b/y2022/vision/camera_reader_main.cc
index 52ee51a..a82d2ac 100644
--- a/y2022/vision/camera_reader_main.cc
+++ b/y2022/vision/camera_reader_main.cc
@@ -6,6 +6,7 @@
 // bazel run //y2022/vision:camera_reader -- --config y2022/config.json
 //   --override_hostname pi-7971-1  --ignore_timestamps true
 DEFINE_string(config, "config.json", "Path to the config file to use.");
+DEFINE_double(duty_cycle, 0.5, "Duty cycle of the LEDs");
 DEFINE_uint32(exposure, 5,
               "Exposure time, in 100us increments; 0 implies auto exposure");
 
@@ -40,6 +41,7 @@
 
   CameraReader camera_reader(&event_loop, &calibration_data.message(),
                              &v4l2_reader);
+  camera_reader.SetDutyCycle(FLAGS_duty_cycle);
 
   event_loop.Run();
 }