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 <VirtualWire.h> | |
int pirPin = 3; //the digital pin connected to the PIR sensor's output | |
char buffer[16]; | |
void setup() { | |
Serial.begin(9600); // Debugging only | |
// Initialise the IO and ISR | |
vw_set_tx_pin(13); |
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
install xcode from appstore for easy install command line | |
install command line at xcode | |
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
sudo mkdir /usr/local/Cellar | |
sudo chown -R `whoami` /usr/local | |
echo 'export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"' >> ~/.bash_profile | |
brew doctor --verbose | |
\curl -L https://get.rvm.io | bash -s stable --ruby |
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 <VirtualWire.h> // ver. 1.5 | |
#include <pt.h> | |
//global variable | |
#define MSG_SIZE 14 | |
// end global variable | |
static struct pt pt1, pt2; // each protothread needs one of these | |
char buffer[MSG_SIZE]; | |
float maxv, CO, CO_raw; | |
int circ = 5, heat = 6, send_round = 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
// Control an 8x8 LED display with 2 x 74HC595 shift registers | |
// Using only 3 pins from the Arduino | |
// shift register = 8 pin | |
#define DEVICES 6 | |
#define SHIFT_REGISTER 8 | |
#define ALLFPIN SHIFT_REGISTER * DEVICES | |
// while condition variable | |
int whileVar = 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
#!/usr/bin/python | |
# read more command | |
# http://www.elechouse.com/elechouse/images/product/13.56MHZ_RFID_Module/13.56MHZ_RFID_Manual.pdf | |
import serial | |
ser = serial.Serial( | |
port='/dev/tty.SLAB_USBtoUART', | |
baudrate=9600, | |
parity=serial.PARITY_NONE, | |
stopbits=serial.STOPBITS_ONE, |
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
// Control an 8x8 LED display with 2 x 74HC595 shift registers | |
// Using only 3 pins from the Arduino | |
// shift register = 8 pin | |
#define DEVICES 6 | |
#define SHIFT_REGISTER 8 | |
#define ALLFPIN SHIFT_REGISTER * DEVICES | |
// while condition variable | |
int whileVar = 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
int minVal = -999; | |
int threshold = 20; | |
int calibrate = 300; | |
int val = 0; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} |
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
/* | |
Simple example for receiving | |
http://code.google.com/p/rc-switch/ | |
Need help? http://forum.ardumote.com | |
*/ | |
#include <RCSwitch.h> |
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
ALAssetRepresentation *assetRepresentation = [asset defaultRepresentation]; | |
CGImageRef fullResImage = [assetRepresentation fullResolutionImage]; | |
NSString *adjustment = [[assetRepresentation metadata] objectForKey:@"AdjustmentXMP"]; | |
if (adjustment) { | |
NSData *xmpData = [adjustment dataUsingEncoding:NSUTF8StringEncoding]; | |
CIImage *image = [CIImage imageWithCGImage:fullResImage]; | |
NSError *error = nil; | |
NSArray *filterArray = [CIFilter filterArrayFromSerializedXMP:xmpData | |
inputImageExtent:image.extent |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
[ExecuteInEditMode] | |
public class VisibleCollider : MonoBehaviour { | |
public bool showLine = true; | |
public Color lineColor = Color.blue; |
OlderNewer