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 "testApp.h" | |
//-------------------------------------------------------------- | |
ofMesh testApp::pixelManipulate(ofImage imageA, ofMesh meshA, float intensityThreshold, float sketchDepth){ | |
imageA.resize(200, 200); | |
//create mesh with points as the primitive | |
//meshA.setMode(OF_PRIMITIVE_POINTS); | |
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
Planet p, p2, c, c2, d, d2, g, g2, e, e2; | |
void setup(){ | |
size(1024, 768, P3D); | |
// have to do all the openGL stuff on the main thread | |
e = new Planet(50, 150, PI/20, -250); | |
e2 = new Planet(50, -150, PI/20, -250); | |
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
// Joselyn McDonald w/ help from Processing examples | |
//----arduino stuff---// | |
import processing.serial.*; | |
import cc.arduino.*; | |
Arduino arduino; | |
//hooking up the arduino - attach one outer leg to 5v; one outer leg to ground; and one to your Analog IN pins// | |
int pot1 = 2; // potentiometer 1 is attached to pin A2 |
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 Soft Circuits/Capsense Connection via Spacebrew toolkit | |
//by Joselyn McDonald and Nicole Messier | |
//first step: run StandardFirmata sketch in the Arduino IDE | |
//StandardFirmata sketch if dound under file>examples>firmata>StandardFirmata | |
//move to Processing for the remainder of this project | |
//Firmata makes processing now behave like the Arduino IDE | |
//import firmata library | |
//Sketch>>Import Library>>Arduino(Firmata) |
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 Soft Circuits/Capsense Connection via Spacebrew toolkit | |
//by Joselyn McDonald and Nicole Messier | |
//This is Part B of input - You should have already run the Arduino Serial and CapSense Sketch - Soft_Circuits_Capsense_Input_Arduino_Part_A - | |
//You will need to download Spacebrew and put the spacebrew library in the libraries folder | |
import spacebrew.*; | |
//import the Serial library so can read from arudino input via serial communication | |
import processing.serial.*; |
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 the capSense Library | |
#include <CapacitiveSensor.h> | |
//these are the capsense inputs 2 is the common send the second number is the | |
//other digital input the sensor is attached to | |
CapacitiveSensor cs_2_3 = CapacitiveSensor(2,3); | |
void setup() { | |
//Begin Serial Communication with a baud rate of 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
/* frequencyModulation | |
<p> | |
A simple example for doing FM (frequency modulation) using two Oscils. | |
<p> | |
For more information about Minim and additional features, | |
visit http://code.compartmental.net/minim/ | |
<p> | |
Author: Damien Di Fede | |
*/ | |
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 spacebrew.*; | |
import processing.serial.*; | |
String server = "sandbox.spacebrew.cc"; | |
String name = "PhotoCell_Publisher_" + floor(random(1000)); | |
String description = "This is an example client which publishes the value of a photocell connected to an Arduino "; | |
int bright = 0; // the value of the phtocell we weill send over spacebrew | |
Spacebrew spacebrewConnection; // Spacebrew connection object |
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
void setup() { | |
// open serial port | |
Serial.begin(9600); | |
} | |
void loop() { | |
// read and send the value of analog sensor | |
long raw_val = analogRead(A0); | |
// use to adjust the range, if necessary |