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
// Code by Jeremy Nir 2014 | |
// Frankensteined together from Servo example and Digital Read examples on Arduino.cc | |
// short and sweet code that turns on a power bar when a coin is inserted | |
#include <Servo.h> | |
int servoPin = 9; | |
Servo servo; | |
//int angleON = 68; // servo flicks to it's left | |
//int angleOFF = 58; // servo flicks to it's right |
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 knob0; | |
//int knob1; | |
void setup() { | |
// initialize the serial communication: | |
Serial.begin(9600); | |
} | |
void loop() { | |
knob0=analogRead(A0); |
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
// Adapted from the Graphing sketch by Jeremy Nir | |
import processing.serial.*; | |
PImage img; | |
Serial myPort; // The serial port | |
int knobby = 1; // horizontal position of the graph | |
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 <Servo.h> | |
Servo servo1; Servo servo2; | |
void setup() { | |
pinMode(1,OUTPUT); | |
servo1.attach(9); //analog pin 0 | |
//servo1.setMaximumPulse(2000); |
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
/** | |
* 2 x Servo Mouse Controller adapted | |
* Jeremy Nir 2014 | |
* Adapted from original code by Fairlane | |
*/ | |
import processing.serial.*; // Use the included processing code serial library |
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
// Jeremy Nir - Physical Computing 2014 | |
// This code turns on an LED to let you know that you're out of aluminum foil. | |
const int ledPin = 13; | |
const int inputPin = 2; | |
void setup() { pinMode(ledPin, OUTPUT); | |
pinMode(inputPin, INPUT); | |
} |