This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import libraries | |
import time | |
import os | |
while True: # do forever | |
os.system('fswebcam -r 320x240 -S 3 --jpeg 50 --save /home/pi/to_transmit/%H%M%S.jpg') # uses Fswebcam to take picture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
import curses | |
import time | |
import threading | |
class Clock(threading.Thread): | |
""" Clock curses string class. Updates every second. Easy to install """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.asoundrc or /etc/asound.conf | |
# ALSA configuration file | |
##### USAGE ##### | |
# Save this file as "~/.asoundrc" (for user-specific sound configuration) or | |
# "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA | |
# device names ad described in the next section. | |
##### DEVICE NAMES ##### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from PIL import Image | |
def vstack(images): | |
if len(images) == 0: | |
raise ValueError("Need 0 or more images") | |
if isinstance(images[0], np.ndarray): | |
images = [Image.fromarray(img) for img in images] | |
width = max([img.size[0] for img in images]) |