Skip to content

Instantly share code, notes, and snippets.

View Jxck-S's full-sized avatar
🏠
Working from home

Jack Sweeney Jxck-S

🏠
Working from home
  • Student
  • Orlando Florida
View GitHub Profile
@Jxck-S
Jxck-S / read_sensor_colored.py
Last active August 6, 2017 20:34 — forked from legotheboss/read_sensor.py
Python Script to Read Garage Sensor
from time import sleep
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12, GPIO.IN)
while True:
if (GPIO.input(12) == True):
print('\x1b[1;37;42m' + 'Garage Door Closed' + '\x1b[0m')
else:
print('\x1b[1;37;43m' + 'Garage Door Open' + '\x1b[0m')