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/python | |
# -*- coding: utf-8 -*- | |
import RPi.GPIO as GPIO | |
import time | |
import types | |
GPIO.setmode(GPIO.BOARD) | |
CLOCK = 36 # G16 |
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/python | |
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
CLOCK = 36 # G16 | |
DATA = 7 # G4 |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: gpshiftreg | |
# Required-Start: $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Clocks in data to a shift register over GPIO | |
# Description: Turns on and off the segments a 4-digit 7-segment display salvaged from a microwave | |
### END INIT INFO |
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
{ | |
"accessory": "UdpContactSensor", | |
"name": "UDP Contact Sensors", | |
"listen_port": 8266, | |
"data": { | |
"Switch #2": { "on": "02ff", "off": "0200" }, | |
"Switch #3": { "on": "03ff", "off": "0300" }, | |
"Switch #4": { "on": "04ff", "off": "0400" } | |
} |
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
{ | |
"accessory": "Http", | |
"name": "Stand Lamp", | |
"http_method": "GET", | |
"on_url": "http://192.168.1.4/outlet/on", | |
"off_url": "http://192.168.1.4/outlet/off", | |
"service": "Light" | |
}, | |
{ | |
"accessory": "Http", |
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/python | |
import RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BOARD) | |
DOT = 36 # G16 | |
GPIO.setwarnings(False) |
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
videodevice /dev/video0 | |
stream_port 8081 | |
stream_localhost off | |
despeckle EedDl | |
smart_mask_speed 0 | |
webcontrol_localhost off | |
webcontrol_port 8082 | |
rotate 180 | |
height 2592 | |
width 1944 |
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/python -u | |
# tachfan.py - read RPM from a PC fan tachometer wired to GPIO | |
# | |
# references: | |
# http://electronics.stackexchange.com/questions/8295/how-to-interpret-the-output-of-a-3-pin-computer-fan-speed-sensor | |
# http://www.formfactors.org/developer/specs/REV1_2_Public.pdf | |
import RPi.GPIO as GPIO | |
import time | |
import pigpio |
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/python -u | |
# tachfan.py - read RPM from a PC fan tachometer wired to GPIO | |
# | |
# references: | |
# http://electronics.stackexchange.com/questions/8295/how-to-interpret-the-output-of-a-3-pin-computer-fan-speed-sensor | |
# http://www.formfactors.org/developer/specs/REV1_2_Public.pdf | |
import RPi.GPIO as GPIO | |
import time |
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
'use strict'; | |
var mcpadc = require('../'); | |
function readadc(channel, cb) { | |
var adc = mcpadc.openMcp3304(channel, {speedHz: 20000}, function (err) { | |
if (err) throw err; | |
adc.read(cb); | |
}); |
NewerOlder