Skip to content

Instantly share code, notes, and snippets.

View phoenixperry's full-sized avatar

Phoenix Perry phoenixperry

View GitHub Profile
#define N_SENSORS 6
#define BLINK_INTERVAL 500
//#define HWSERIAL Serial1
#define SWSERIAL Serial
int btnP0 = A0;
int btnP1 = A1;
int btnP2 = A2;
int btnP3 = A3;
int btnP4 = A4;
#include "ofApp.h"
ofPoint center_p;
ofPoint p;
ofPolyline hexLine;
//ofMesh hexMesh;
vector<ofPoint> points;
ofColor hexColor = *new ofColor(0,200,0);
//--------------------------------------------------------------
void ofApp::setup(){
ofBackground(0);
using UnityEngine;
using System.Collections;
public class Tester : MonoBehaviour {
// Use this for initialization
void Start () {
}
import processing.serial.*;
import netP5.*;
import oscP5.*;
import processing.net.*;
OscP5 oscP5;
int receiveAtPort;
int sendToPort;
#the goal of this app is to get the user to put in a power of two under 512 and then count up in powers of two until you
#get to 512, outputting the results along the way.
import math
def powersOfTwo(x):
isAPowerOfTwo = not(x == 0) and not(x & (x - 1)); #test to see if you have a power of two
#the way this works is
#step 1 make sure we've not got 0
#step 2 and make sure that you've got a legit power of 2. This is a bitwise AND operator
def powersOfTwo(x):
count = 1 #start at the first power of 2, 1
isAPowerOfTwo = False #have a nice little bool to see if we have a power of two for user output
if(x == 1): #a little test to see if we're dealing with 1, which is a bit of a special case
isAPowerOfTwo = True #filp the boolean so we know we have a power of two
for i in range(9): # we need to go through this 8 times b/c 512 is the 8th bit shift 000000000
#0000000000 = 0 (first time)
#0000000001 = 1 (time 1 through the loop)
def powersOfTwo(x):
#first check to see if x is a power of two
# proceed to raise it
if x >=512
break
else
#some logic
print x
/Applications/Processing 2.app/Contents/Resources/Java/modes/java/libraries/serial/library/macosx
f you're vegetarian, don't stay here. They have no meal options that are not a salad and in fact, they'll refuse to let you eat if you do bring in food. We were waiting for our taxi in the lobby and told we had to throw away our to go sandwich and tea if we wanted to stay. That kind of behaviour, unless clearly disclosed, is really wrong when you are paying to stay in a hotel. We had to come across the street to a cafe to drink tea with soy milk. Also, the wifi is really poor in the rooms. I think this is to force you into the wifi where you have to buy food even if you're not in the hotel restaurant area because there's no place to sit otherwise. Normal lobby seats are included in the restaurant part even though they are not marked as such. There is no place to sit at all downstairs they will not bother you and let you work in peace.
Undefined symbols for architecture i386:
"ofxAudioUnit::setRenderCallback(AURenderCallbackStruct, int)", referenced from:
ofxAudioUnitDSPNode::connectTo(ofxAudioUnit&, int, int) in ofxAudioUnitDSPNode.o
"ofxAudioUnit::ofxAudioUnit(ofxAudioUnit const&)", referenced from:
std::vector<ofxAudioUnit, std::allocator<ofxAudioUnit> >::_M_fill_insert(__gnu_cxx::__normal_iterator<ofxAudioUnit*, std::vector<ofxAudioUnit, std::allocator<ofxAudioUnit> > >, unsigned long, ofxAudioUnit const&) in Hut.o
void std::_Construct<ofxAudioUnit, ofxAudioUnit>(ofxAudioUnit*, ofxAudioUnit const&) in Hut.o
"ofxAudioUnit::operator=(ofxAudioUnit const&)", referenced from:
ofxAudioUnitFilePlayer::operator=(ofxAudioUnitFilePlayer const&) in Hut.o
void std::__fill<false>::fill<ofxAudioUnit*, ofxAudioUnit>(ofxAudioUnit*, ofxAudioUnit*, ofxAudioUnit const&) in Hut.o
ofxAudioUnit* std::__copy_backward<false, std::random_access_iterator_tag>::__copy_b<ofxAudioUnit*, ofxAudioUnit*>(ofxAudioUnit*, ofxAudi