Skip to content

Commit bf9eb97

Browse files
...
1 parent 6d40a31 commit bf9eb97

3 files changed

Lines changed: 36 additions & 0 deletions

File tree

scripts/dance.py

Whitespace-only changes.

scripts/light_painting.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import time
2+
from picamera2 import Picamera2
3+
4+
# Initialize camera
5+
picam2 = Picamera2()
6+
config = picam2.create_still_configuration()
7+
picam2.configure(config)
8+
picam2.start()
9+
10+
def take_long_exposure(duration_seconds=10, filename="long_exposure.jpg"):
11+
print(f"📸 Preparing {duration_seconds}s exposure...")
12+
13+
# Convert seconds to microseconds
14+
exposure_time_us = int(duration_seconds * 1_000_000)
15+
16+
# Set manual controls
17+
# Note: We set these BEFORE capturing
18+
picam2.set_controls({
19+
"ExposureTime": exposure_time_us,
20+
"AeEnable": False, # Disable Auto Exposure
21+
"AnalogueGain": 1.0, # Keep gain low to reduce 'noise' (graininess)
22+
"AwbEnable": False, # Disable Auto White Balance for consistency
23+
"ColourGains": (1.5, 1.5)
24+
})
25+
26+
# Wait for settings to settle
27+
time.sleep(2)
28+
29+
print("🚀 Shutter OPEN...")
30+
picam2.capture_file(filename)
31+
print(f"✅ Shutter CLOSED. Saved as {filename}")
32+
33+
try:
34+
take_long_exposure(10) # 10-second exposure
35+
finally:
36+
picam2.stop()

scripts/qr_reader.py

Whitespace-only changes.

0 commit comments

Comments
 (0)