This file contains hidden or 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
class StreamReader { | |
let encoding : UInt | |
let chunkSize : Int | |
var fileHandle : NSFileHandle! | |
let buffer : NSMutableData! | |
let delimData : NSData! | |
var atEof : Bool = false |
This file contains hidden or 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
NSDictionary* views = @{@"collectionView": self.collection}; | |
NSArray* sHorizontal = [NSLayoutConstraint constraintsWithVisualFormat:@"H:|[collectionView]|" | |
options:0 | |
metrics:nil | |
views:views]; | |
NSArray* sVertical = [NSLayoutConstraint constraintsWithVisualFormat:@"V:|[collectionView]|" | |
options:0 |
This file contains hidden or 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
/* Define shift register pins used for seven segment display */ | |
#define LATCH_DIO 4 | |
#define CLK_DIO 7 | |
#define DATA_DIO 8 | |
#define Pot1 0 | |
/* Segment byte maps for numbers 0 to 9 */ | |
const byte SEGMENT_MAP[] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0X80,0X90}; | |
/* Byte maps to select digit 1 to 4 */ |
This file contains hidden or 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
const byte LED[] = {13,12,11,10}; | |
#define Pot1 0 | |
void setup() | |
{ | |
Serial.begin(9600); | |
// initialize the digital pin as an output. | |
/* Set each pin to outputs */ | |
pinMode(LED[0], OUTPUT); | |
pinMode(LED[1], OUTPUT); |
This file contains hidden or 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
const byte LED[] = {13,12,11,10}; | |
#define BUTTON1 A1 | |
#define BUTTON2 A2 | |
void setup() | |
{ | |
// initialize the digital pin as an output. | |
/* Set each pin to outputs */ | |
pinMode(LED[0], OUTPUT); |
This file contains hidden or 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 led1 = 13; | |
int led2 = 12; | |
int led3 = 11; | |
int led4 = 10; | |
void setup() | |
{ | |
// initialize the digital pin as an output. | |
pinMode(led1, OUTPUT); | |
pinMode(led2, OUTPUT); |
NewerOlder