This is a simple script to use ADC input on Beaglebone black to measure camera shutter speed.
A photoresistor is used to detect the light when shutter open, and hence changing the values read by ADC pin P9_40. The push button is used to trigger the Python script to start reading the ADC input.
git clone https://github.com/kitsook/bbb-adc-measure cd bbb-adc-measure python3 -m venv venv . venv/bin/activate pip install -r requirements.txt python adc-measure.py -t 10 > result.csv
Output can be plotted with
gnuplot set mxtics 10 set grid plot 'result.csv' with lines
Note that this is by no mean an accurate measure of absolute shutter speed. The response time of photoresistor will affect the result. Nevertheless, it is useful to compare different shutter speeds.