Skip to content

Instantly share code, notes, and snippets.

sh4un

Block or report user

Report or block sh4un

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sh4un
sh4un / ButtonMonitor.py
Created May 28, 2018 — forked from Everlanders/ButtonMonitor.py
Python Script to monitor GPIO button presses and call the Camera and Backlight.
View ButtonMonitor.py
#!/usr/bin/python
import RPi.GPIO as GPIO
import time
import subprocess, os
import signal
GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
RearView_Switch = 14 # pin 18
Brightness_Switch = 15 # pin 16
@sh4un
sh4un / backlight.sh
Created May 28, 2018 — forked from Everlanders/backlight.sh
Script to Change the Backlight brightness on the Official Raspberry Pi 7" display.
View backlight.sh
#!/bin/bash
level=$1
#echo "level given is $level"
if [ $# != 1 ]; then
echo "USAGE: $0 brightness_level (0 to 255)"
exit 1
fi
@sh4un
sh4un / LightMonitor.py
Created May 28, 2018 — forked from Everlanders/LightMonitor.py
Headlight and Reverse Lights monitor for YouTube Commenters - UNTESTED but should work fine.
View LightMonitor.py
#!/usr/bin/python
# A quick hack of my button monitor script to monitor headlights and reverse lights to
# Dim the screen and switch to the reverse camera.
# I have not tested this...
# Remember, the switch or opto is switching to ground, so the logic is inverted... 0 = on 1 = off
# Also, you would run only one of these "Monitor" scripts. you can't be running RearviewMonitor.py AND LightMonitor.py
import RPi.GPIO as GPIO
import time
import subprocess, os
You can’t perform that action at this time.