Skip to content

Instantly share code, notes, and snippets.

View trianglegrrl's full-sized avatar

Alaina Hardie trianglegrrl

View GitHub Profile
@trianglegrrl
trianglegrrl / pir.py
Created July 22, 2015 01:13
SU GSP NCS PIR WTF
import RPi.GPIO
import os
import time
from pyslack import SlackClient
import requests
import json
import string
url = "https://hooks.slack.com/services/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"
@trianglegrrl
trianglegrrl / api_get.py
Created July 22, 2015 01:12
SU GSP NCS API WTF
import os
import requests
import json
# Photoresistor - light levels
#results = requests.get('https://api.particle.io/v1/devices/53ff6e066678505543482367/analog_value?access_token=3766bed852ce344d768142fe1cb41d4416d58b5d')
# Sound sensor
#results = requests.get('https://api.particle.io/v1/devices/54ff66066678574935400667/analog_value?access_token=3766bed852ce344d768142fe1cb41d4416d58b5d')
@trianglegrrl
trianglegrrl / CoreRFRemote
Created April 15, 2015 17:54
Spark Core code to control RF remote
//
// http://alainahardie.com/spark-me-up
//
// name the pins
int unlockPin = D2;
int lockPin = D3;
int lockState = 0;
// Send the unlock code