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
/* | |
3 Gummy Bears - Halloween Hack 2014 | |
written by Nicole Parrot | |
Heavily based on code by DojoDave and Tom Igoe, as found on the Arduino website. | |
http://arduino.cc/en/Tutorial/Button | |
The circuit: | |
* uses Clyde's Ambient light, RGB connected to pins 5, 6 and 9 | |
* 3 x gummy bears respectively attached to pin 10, 12 and 13 from +5V |
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
/* | |
3 Gummy Bears - Halloween Hack 2014 | |
written by Nicole Parrot | |
Heavily based on code by DojoDave and Tom Igoe, as found on the Arduino website. | |
http://arduino.cc/en/Tutorial/Button | |
The circuit: | |
* uses Clyde's Ambient light, RGB connected to pins 5, 6 and 9 | |
* 3 x gummy bears respectively attached to pin 10, 12 and 13 from +5V | |
* 3 x 330 ohms resistors respectively attached to pin 10, 12 and 13 from ground |
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 RPi.GPIO as GPIO | |
import time | |
GPIO.setmode(GPIO.BCM) | |
pin1 = 18 #red | |
pin2 = 23 #green | |
pin3 = 24 #blue | |
GPIO.setup(pin1,GPIO.OUT) |
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 twython import Twython | |
import time | |
import serial | |
import sys | |
COUNTDOWN = 6 | |
DELAY = 60 | |
COUNTTWEETS = 5 | |
R_HASH = "#ClydeRed" | |
B_HASH = "#ClydeBlue" |
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
/***************************************************************** | |
XBee_Comm.ino | |
Set up a software serial port to pass data between an XBee Shield | |
and the serial monitor. | |
Based on code found at https://learn.sparkfun.com/tutorials/xbee-shield-hookup-guide/example-communication-test | |
*****************************************************************/ | |
// utilitarian function | |
// feel free to change if you want a different blink | |
void blink() |