/ RasPi_Low_Light_Camera / lowlight.py
lowlight.py
1 # SPDX-FileCopyrightText: 2021 Anne Barela for Adafruit Industries 2 # 3 # SPDX-License-Identifier: MIT 4 5 from picamera import PiCamera 6 import time 7 from fractions import Fraction 8 import datetime 9 10 cur_time = datetime.datetime.now() 11 stub = cur_time.strftime("%Y%m%d%H%M_low") 12 13 camera = PiCamera(framerate=Fraction(1,6)) 14 15 # You can change these as needed. Six seconds (6000000) 16 # is the max for shutter speed and 800 is the max for ISO. 17 camera.shutter_speed = 1750000 18 camera.iso = 800 19 20 time.sleep(30) 21 camera.exposure_mode = 'off' 22 23 outfile = "%s.jpg" % (stub) 24 camera.capture(outfile) 25 26 camera.close()