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 cv2 | |
import subprocess | |
cap = cv2.VideoCapture(0) | |
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) | |
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) | |
fps = int(cap.get(cv2.CAP_PROP_FPS)) | |
if fps == 0: | |
fps = 30 |
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
#!/bin/bash | |
# Check Wiring Pi installed | |
if ! command -v gpio &> /dev/null; then | |
echo "You must install WiringPi." | |
exit 1 | |
fi | |
# WiringPi ID of GPIO pin | |
GPIO=0 |
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/env bash | |
echo "Welcome to Pantheon installation script!" | |
# Check root access | |
if ! [[ $(id -u $USER) -eq 0 ]]; then | |
echo "You must be root!" | |
exit | |
fi |