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 | |
# | |
# Copyright 2007 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
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
import platform | |
import requests | |
class Choir: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
self.agentConfig = agentConfig | |
self.checksLogger = checksLogger | |
self.rawConfig = rawConfig | |
self.version = platform.python_version_tuple() |
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
// color swirl! connect an RGB LED to the PWM pins as indicated | |
// in the #defines | |
// public domain, enjoy! | |
#define REDPIN 5 | |
#define GREENPIN 6 | |
#define BLUEPIN 3 | |
#define FADESPEED 5 // make this higher to slow down | |
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
from blinkstick import blinkstick | |
import requests | |
import serial | |
import webcolors | |
import time | |
import json | |
# url to fetch from | |
cheer_lights_url = "http://api.thingspeak.com/channels/1417/field/1/last.json" | |
serial_port = '/dev/tty.usbmodem1421' |
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
#include <Wire.h> | |
#include <string.h> | |
#include <Adafruit_MotorShield.h> | |
#include "utility/Adafruit_PWMServoDriver.h" | |
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); | |
Adafruit_DCMotor *motor3 = AFMS.getMotor(3); | |
Adafruit_DCMotor *motor4 = AFMS.getMotor(4); |
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
#include <DHT.h> | |
#include <Wire.h> | |
#include <Adafruit_Sensor.h> | |
#include <Adafruit_BMP085.h> | |
#define DHTPIN 2 | |
#define DHTTYPE DHT22 | |
DHT dht(DHTPIN, DHTTYPE); | |
int LDR_Pin = A0; |
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
from pymongo import Connection | |
import time | |
from datetime import datetime | |
import plotly | |
conn = Connection('localhost', 27017) | |
db = conn.skynet | |
collection = db.events | |
# 24 hour time range |
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
import platform | |
import requests | |
class SeedBox: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
self.agentConfig = agentConfig | |
self.checksLogger = checksLogger | |
self.rawConfig = rawConfig | |
self.version = platform.python_version_tuple() |
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
// Author:Chris Hannam | |
// This library is free software; you can redistribute it and/or | |
// modify it under the terms of the GNU Lesser General Public | |
// License as published by the Free Software Foundation; either | |
// version 2.1 of the License, or (at your option) any later version. | |
// | |
// This library is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// Lesser General Public License for more details. |
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
import platform | |
import requests | |
class Weather: | |
def __init__(self, agentConfig, checksLogger, rawConfig): | |
self.agentConfig = agentConfig | |
self.checksLogger = checksLogger | |
self.rawConfig = rawConfig | |
self.version = platform.python_version_tuple() |