This file contains 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
<? | |
header("Content-type: text/html; charset=utf-8"); | |
if(empty($_SERVER['PHP_AUTH_USER'])) { | |
header('WWW-Authenticate: Basic realm=""'); | |
header('HTTP/1.0 401 Unauthorized'); | |
echo 'Password Required'; | |
exit; | |
} else { | |
$password = "password"; | |
if( |
This file contains 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 python | |
import RPi.GPIO as GPIO # RPi.GPIO can be referred as GPIO from now | |
import time | |
ledPin = 17 # pin17 | |
def setup(): | |
GPIO.setmode(GPIO.BCM) # Use BCM Pin Numbering to match T-Cobbler Numbering | |
GPIO.setup(ledPin, GPIO.OUT) # Set ledPin as output | |
GPIO.output(ledPin, GPIO.LOW) # Set ledPin to LOW to turn Off the LED |