Other ideas for Arduino electric eye

notes

5/2014 – check out musical stairs project for eventual solution: https://reactivemusic.net/?p=12300

original post

Infrared reflectance sensor – no idea whether this can be focused to a beam

http://www.ebay.com/itm/Infrared-Reflectance-Sensor-Sensor-Shield-Arduino-compatible-/170842956075?pt=LH_DefaultDomain_0&hash=item27c708a12b

IR detector emitter data

http://www.me.umn.edu/courses/me2011/arduino/technotes/irbeam/irbeam.html

Tachometer circuit

http://www.pyroelectro.com/tutorials/tachometer_rpm_arduino/

Long range beam

http://pcbheaven.com/circuitpages/Long_Range_IR_Beam_Break_Detector/

 

 

Infrared Beam Sensors

Arduino Automated LED Stairway Lighting.

http://www2.cs.uidaho.edu/~lawrench/electrical_projects/stairway_lighting/stairway40.html

This project uses the Radio Shack emitter/detector LED pair 276-142 – There is no modulation of the ir signal. The project includes detailed descriptions plus photographs of the Arduino and breadboard configuration.

Here is some more information about the RS ir emitter/detector pair

http://www.societyofrobots.com/schematics_infraredemitdet.shtml

 

Detecting an IR Beam Break using the Arduino IR Library

A simple electric eye circuit

By Ken Shirriff

http://www.arcfn.com/2010/03/detecting-ir-beam-break-with-arduino-ir.html

update 5/2014 – For current information, see the musical stairs project – using this IR library with sensors from Adafruilt: https://reactivemusic.net/?p=12300

original post

I was able to build a version of this using some ir receivers from radio shack. The receivers were different – one received a relatively narrow angle beam, while the other one seemed to pick up everything in the room. So, although this method works, it will require some hardware tweaking.

Here’s my Arduino code for this… Note that the code runs 2 beams but the photos and videos only show one in the circuit.

#include <IRremote.h>
// tz 12/26/2012
/* This works with the basic IR beam layout of an
IR emitter and IR receiver from radio shack - when you break the 
beam, like with your hand the LED on D13 lights up.

*/
#define PIN_IR 3
#define PIN_DETECT 2
#define PIN_STATUS 13

#define PIN_DETECT_B 7
#define PIN_STATUS_B 8

int counter = 0;
int stat = 0;
int stat_B = 0;

IRsend irsend;
void setup()
{
   Serial.begin(9600); // open the serial port
  pinMode(PIN_DETECT, INPUT);
  pinMode(PIN_STATUS, OUTPUT);

    pinMode(PIN_DETECT_B, INPUT);
  pinMode(PIN_STATUS_B, OUTPUT);
  irsend.enableIROut(38);
  irsend.mark(0);
}

void loop() {
//  digitalWrite(PIN_STATUS, !digitalRead(PIN_DETECT));
irsend.space(0);
delay(1);
irsend.mark(0);
stat = digitalRead(PIN_DETECT);
digitalWrite(PIN_STATUS, stat);

stat_B = !digitalRead(PIN_DETECT_B);
digitalWrite(PIN_STATUS_B, stat_B);
delay(1);

counter++;
if(counter > 1000) {
  Serial.print("A: ");
  Serial.print(stat);
  Serial.print(" B: ");
  Serial.print(stat_B);
  Serial.println();
  counter = 0;
}
}

 

 

How to set up wireless ad hoc network on Mac OS

right-click the wi-fi signal icon in the status bar and select ‘create network’

This is useful if you are trying to run a project which requires WiFi – like touchOSC – and you are on a restricted network – at a school for example. You make your own network which is separate from the Internet.

at dummies.com

http://www.dummies.com/how-to/content/how-to-create-a-wireless-ad-hoc-network-between-macs.html

 

interactive media arts demo projects

Current example projects for the Interactive Media Arts course at Gould Academy. Eventually this list will be all student projects.

Light Saber Simulator by Erick Robicseke

From Fall trimester 2012.

Triggers light saber sounds by using Kinect sensor to detect arm movement

Components

  • Max/MSP
  • Kinect
  • Synapse

A video of the project is at Cycling74.com http://cycling74.com/project/light-saber-simulator

Note: I haven’t actually tried to run this yet without Erick helping to make it work.

Kinect Air Piano adapted from Ryan Challinor

Note for Kinect projects: It can be difficult to get Synapse to recognize your skeleton. I have had good results being about 10 feet away from the sensor – and making sure it can see your whole body.

Example of playing a Midi Instrument using Kinect sensor

Components

  • Ableton Live
  • Max for Live
  • Kinect
  • Synapse

File Location: kinect/myLiveSets/lefthandpiano Project/leftHandPiano.als

Use left hand to play a few piano notes by horizontal movement

Dubkinect by Ryan Challinor

Example of playing a Midi Instrument using Kinect sensor

Components

  • Ableton Live
  • Max for Live
  • Kinect
  • Synapse

Location: kinect/synapse examples/dubkinect Project/dubkinect.als

More information about Synapse and Ryan Challinor: http://synapsekinect.tumblr.com/

Instructions

It tracks lots of joints, but to start, place hands together above head and pull apart quickly, then use left arm (vertical) for volume, right hand horizontal for wobble, right hand vertical for pitch, and so on.

Wiimote light IR Light Painting and Synth controller

[note] – need to build a new IR pointer or get one – the switch and battery are a bit flakey and that messes up the drawing at times.

Musical light painting using Wiimote and homemade IR device.

Components

  • Max/MSP
  • Osculator
  • Wiimote

– musical light painter location: max teaching examples/tz examples/ir4.maxpat

  • turn on osculator and make sure wii is transmitting raw IR data
  • turn on audio and sound
  • turn on qmetro for jitter

– The hacky synth thing is at Location: max teaching examples/tz examples/wiimote_ir_xy_synth.maxpat – make sure to:

  • turn on audio
  • turn up volume
  • make an audible adsr envelope by turning up the adsr dials
  • increase lfo rate
  • check the wii-mode updreceive port (see below)
  • experiment with the ‘gate’ toggle in the middle of the patch
Osculator notes:
  • The real Wii remotes work better than the neko versions
  • check the output port (gear icon) to make sure it matches the one in max, for example 9000 or 9005
  • recently using wii3.oscd
  • If the indicators in osculator are yellow, then it probably means you havent set output routings in event type and value. Use: OSC routing and the funny pacman symbol
  • make sure osculator/wiimote is connected and sending raw IR data
Wiimote Bicycle Engine

Triggers engine simulation by using wiimote taped to spokes of a bicycle wheel. The speed of the wheel is translated to the speed of the engine sound. Still needs some work.

  • Max/MSP
  • Osculator
  • Wiimote

files max teaching examples/tz examples

  • waveguide_engine2c-bike.maxpat
  • wheelspeed.maxpat
  • bicycle2.maxpat

need to be running Osculator and tracking PRY stuff from wii – need to adjust scale in engine patch. Also, select 3rd preset for engine sound.

So basically this setup needs to get standardized – use metro to send a steady stream of wheel data. Use the up to date car engine patch, etc., etc.,

[update] there are some issues with this – for example when the wheel is stopped the signal rate revs up to over 300  – I think because it rotates backwards for a second. Also when the wheel gets really fast, the pulses just stop! why? – its like the wii-mote is overloaded or something? 4/3/2013 – I have it running so it tracks speed when the bicycle is upside down, as long as you don’t crank it too fast. but as mentioned above – the patch could be cleaned up and simplified.

Car Engine Simulation with OBD-II Sensor

Reads OBD-II bluetooth sensor from car and uses information to control an engine simulation. (Max/MSP, OBD-II sensor)

Location: automax. files:

  • rpm4.maxpat
  • waveguide-engine2e-1.maxpat

Need to run through the initialization sequence to make it work – note this patch needs to have metro streaming of data because it doesn’t change frequently enough to get a smooth engine sound.

Star Trek Transporter

Simulates TOS Star Trek transporter (Max/MSP, Jitter (Vizzie), Korg Nano Controller)

Files are in pd/

  • vizzie-transport2
  • transporter_TOS2-var

Make sure audio is on, vizzie is on, nano controller is plugged in – then press the lower right button in channel nine of the nano controller to start transporter

Guitar Hero Controller

[update – last tried this in December 2012 and ran into a few issues with setup]

Use a Guitar Hero controller play synthesizer in Max.

components

  • Guitar Hero Controller
  • Max/MSP

This patch (buzz_360) has some issues, but it shows how to use and calibrate a Guitar Hero guitar controller in Max/MSP. You will need to get a driver working. See the previous Guitar Hero post about how to do that.

file location: guitarhero/fretbuzz_v0.2/buzz_360_tz3.maxpat

There’s no way to make this work clean for a demo without taking apart the whole button driver patch (buzz_setup_360) and it has some serious max6 compatibility issues. So it just needs to be calibrated every time for now.

Use the GRY mode for a demo…

Before using it, restart Max.

Works in Max6 – need to calibrate first, don’t worry about tilt and whammy for this app but you need to calibrate them first anyway by pressing the X toggle, tilt, then unpress, or it wont work. when you calibrate the buttons, the X toggle should disappear. then save and untoggle the config box.

mode selection example: hold back button, press and hold the green button, then let go of back (that loads mode G)

download link:

http://theguitarzeros.com/download_fretbuzz.php

Cool modes: (guitar)

RY – solo mode – hold down frets and twiddle

GRY – 2 hand tap mode – orange does major 3rd up shift – holding flipper down does one button thing

GB – uses tilt sensor

also Y – power chords

 

To set a mode, hold “back”, then select the color code keys, then release “back”

Irish Train Data Visualization

[update – now part of internet-sensors project]

Collect current train position data from Ireland display it as point data on an XY grid.

components:

  • Max/MSP
  • node.js
  • Web browser
  • Irish train API

 

server files in: hoo/

To run server,

# node max-train1.js

Max files are in: maxNode-jsTest

  • max-train2.maxpat
  • train-drawing3.maxpat

The presets go from low res to high res on Dublin. You can play back train-data1.txt by clicking read message on the data recorder. set metro set to 1 for high speed. Need to manually clear the lcd and lcdsprites in the drawing section.

Green Screen Demo

[update: this really needs an external camera and a large green area]

An example of live chroma-keying, ie. green screen

components

  • Max/MSP – Jitter
  • builtin camera

files in: max teaching examples/

greenScreen1.maxpat

to use:

  • click open (screen grab)
  • click read (moves/nd2.mov)
  • click start/stop toggle
  • in the grab viewer, select the background color to chromakey, by clicking with mouse
Lego Drum Sensor

uses contact microphone for musical effects (patch by Matthew Davidson?)

components

  • Max/MSP
  • Contact Mic

files in: max teaching examples/PM1_piezo_translator

run: _piezo.maxpat

  • plug in mic before you load max and set input to port
  • turn dsp on
  • ******set input to 2 (or 1 )and turn up level
  • try master preset 5
  • also try sample1
Text Rain by Camille Utterback

Uses video tracking to interact with people and affect projection of letters falling on screen

components

(unknown)

 http://camilleutterback.com/projects/text-rain/

Touch OSC controller

Shows how to use an ipod or iphone as a controller

components

  • Max/MSP
  • ipod touch
  • touchOSC

file in: max teaching examples/tz examples

tz-synth-4-touchOSC.maxpat

need to setup touchOSC on the ipod to send to the host which Max is running on – using port 8000 to send data.

Try one of the last presets for a reasonable synth sound. Then use the top (horizontal ) slider in the touchOSC simple layout.

New York Times Archive Search Visualization (Jer Thorpe)

Graphs occurences of Winnie The Pooh characters in the NYTimes since 1985

components

  • processing
  • NYT API

file in: Documents/processing/NYT_GraphMaker/NYT_GraphMaker.pde

Replace occurrences of pooh, kanga, tigger, with whatever, like chocolate, strawberry, cherry, vanilla – then run it. It takes a minute or so to generate the graph. To read the graph start at 12:00 (1985) and read radially clock wise to 2012

Circuit Bent cat alarm

Whenever the cat crosses the path of an electric eye it triggers the gun.

components

  • electric eye
  • toy ray gun

PVC Saxophone with fx processing

PVC tubes with a saxophone mouthpiece hooked into a Roland Sound Canvas for fx processing.

Musical Pants by Ryan Linn

Built with sensors made from foam rubber and pennies – to trigger an icube-x midi controller running into a midi-synthesizer. Ryan did this project at Gould Academy.

http://zproject.wikispaces.com/musical+pants

Music From Weather Data (Cycling74)

Monthly weather data from 4 cities controls a midi piano synthesizer (max/MSP)

Example is a tutorial patch in Max | Help | Max Tutorials | Data | 02dDataScaling.maxpat

This tutorial is one of the best examples of how to connect Max with data to make music and cool visualization…

Stock market music case study

The fluctuations in stock market quotes and volume are converted into musical notes.

components

  • Max/MSP
  • php, mysql, html, javascript

http://zproject.wikispaces.com/stock+market+music

Arduino Twitter election mood light

An adaptation of the classic Arduino mood light which translates twitter mentions of political candidates into voltage levels.

Arduino Files: documents/arduino/networked_lamp.ino

Processing Files: documents/processing/sketch_may15a

needs some testing – also need to clean up file names, get a schematic, etc.,