Skip to content

Instantly share code, notes, and snippets.

@CleoQc
CleoQc / Clyde-3bears.ino
Created May 30, 2015 14:10
Clyde - 3 Bears (with library)
/*
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
@CleoQc
CleoQc / 3bears.ino
Last active August 29, 2015 14:22
Clyde - 3 Bears - raw Arduino
/*
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
@CleoQc
CleoQc / RGBLEDGPIO
Created March 9, 2015 14:33
Control an RGB Led with the GPIO
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)
@CleoQc
CleoQc / Clyde_Twitter.py
Last active August 29, 2015 14:15
Controling Clyde with Twitter
from twython import Twython
import time
import serial
import sys
COUNTDOWN = 6
DELAY = 60
COUNTTWEETS = 5
R_HASH = "#ClydeRed"
B_HASH = "#ClydeBlue"
@CleoQc
CleoQc / Clyde_Xbee
Created December 1, 2014 19:53
Clyde and Xbee communications
/*****************************************************************
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()