Lost Arduino Kit?

20 Dec

Lost Arduino Kit?

Did anyone forget their Arduino kit in the BDA studio? Message me if this is yours!


Final Project – Wine Wall – Tyler Cook & Casey Henrichs

19 Dec

photo photo (3) photo (1)Final Project - Wine Wall - Tyler Cook & Casey Henrichs

Our project used RFID technology to interact with a wine rack. There were two levels of interaction; the LEDs and the displayed text. Ideally we had planned to tag each bottle of wine with an RFID tag and then have those tags display a text when scanned pertaining to that type of wine. The information was a broad definition of a Riesling or Shiraz wine giving information about the grapes, history, and food pairings. This would allow the same tag to be reapplied to another bottle without it being the exact brand of wine.

The ceramic tiles which held the wine bottles were then fitted with LEDs. The idea developed to a point where scanning the tag would interrupt the LED loop and turn certain tile’s LEDs off. The idea behind this was that empty tiles would be dark until a bottle replaced to old one.

For the actual project budget constraints led to a few alterations in the design. Each bottle of wine contained an RFID tag. Due to the financial restraints of the project we were only able to display the piece with 5 wine bottles. These 5 tiles then had LEDs wired separately to transistors on the arduino board to stop the current when that particular tag was scanned. Unfortunately not all of the transistors were compatible and only 2 where able to be displayed with the correct changes in lighting.

Another issue we faced was getting the desired text to be read through processing. Processing would not display character strings received from Arduino. Our way around this was to type the phrases directly into processing or into Firefly. This was not ideal as it did not sync to the scanning of the tags. The information appeared though with the click of the mouse. The other problem with Firefly is that the tool used to display text only allows three inputs. This meant that the final project had two wine bottle tiles that had LEDs turning off when the RFID tags were scanned and three that projected a text when scanned.

Here is the code we used:

// RFID reader for Arduino
// Wiring version by BARRAGAN
// Modified for Arudino by djmatic

int val = 0;
char code[10];
int bytesread = 0;

void setup() {

Serial.begin(2400); // RFID reader SOUT pin connected to Serial RX pin at 2400bps
pinMode(2,OUTPUT); // Set digital pin 2 as OUTPUT to connect it to the RFID /ENABLE pin
//pinMode(5,OUTPUT); //Send to second arduino
digitalWrite(2, LOW); // Activate the RFID reader
digitalWrite(5,HIGH); //LEDs on in tiles

void loop() {

if(Serial.available() > 0) { // if data available from reader
if((val = == 10) { // check for header
bytesread = 0;
while(bytesread 0) {
val =;
if((val == 10)||(val == 13)) { // if header or stop bytes before the 10 digit reading
break; // stop reading

code[bytesread] = val; // add the digit
bytesread++; // ready to read next digit
if(bytesread == 10) { // if 10 digit read is complete
//Serial.print(“TAG code is: “); // possibly a good TAG
Serial.println(val); // print the TAG code
if (val==65){
Serial.println(“Shiraz originated in the Rhône region of France.”);
Serial.println(“Wines made from Syrah are often powerfully flavoured and full-bodied. While there is a wide range of aromas, two that are often noticed in Shiraz wines are that of blackberry and pepper.”);
Serial.println(“Shiraz is a heavy red with big bodied flavor and therefore pairs well with meets such as beef and lamb.”);
digitalWrite(5,LOW); // LEDs off when scanned
Serial.println(“Malbec originated in the Bordeaux region of France and has spread to South America.” );
Serial.println(“Wines made from Malbec grapes have hints of ripe fruits and earthy greens.”);
Serial.println(“Malbec is a medium bodied red wine pairing well with red meats and dishes of Mexican, Cajun, or Italian cuisine.”);

Serial.println(“Rosé wine originated in the Provence region of France which was settled by ancient Greeks around 600 BC.”);
Serial.println(“Wines of this sort rely on the skins of the grapes to color the wine but remove them before they add a harshness to the flavor.”);
Serial.println(“Since rosés are made with a variety of grapes the flavor ranges from light and fruity to a darker heartier wine.”);
Serial.println(“Due to it’s wide variety of blends a rosé pairs well with an endless possibility of foods.”);
Serial.println(“Sauvignon blanc is a green grape that originated in the Bordeaux region of France”);
Serial.println(“The grapes were named after the French word for wild, sauvage, and produce wines with flavors ranging from zesty lime to a flowery peach. “);
Serial.println(“This herbaceous wine pairs well with simple greens and herbs.”);
Serial.println(“Riesling originated in the Rhine region of Germany.”);
Serial.println(“Riesling wines tend to exhibit notes of apple and tree fruit.”);
Serial.println(“Noble rot is a term used when Riesling grapes were harvested after a harsh freeze creating a much sweeter wine.”);
Serial.println(“Sweet riesling wines pair well with dessert as they are semi-carbonated like dessert champagnes.”);

bytesread = 0;
digitalWrite(2, HIGH); // deactivate the RFID reader for a moment so it will not flood
delay(1500); // wait for a bit
digitalWrite(2, LOW); // Activate the RFID reader

// extra stuff
// digitalWrite(2, HIGH); // deactivate RFID reader


Final Project – Shadowbox (aka Mystery Box) – Kevin Desautels, Dennis MacAvaney, Kierra Thomas

19 Dec

Final Project - Shadowbox (aka Mystery Box) -  Kevin Desautels, Dennis MacAvaney, Kierra Thomas

Shadowbox is an installation that manipulates shadows. It works best in a dark room with a single light source. The goal of this project was to produce a fun, interactive piece that is both reactive and somewhat unpredictable (to add interest).
The Box contains an Arduino, a webcam, 2 potentiometers, and has a frosted plastic screen on which to cast shadows. The frosted plastic aids the processing script in blob detection by filtering out color. One potentiometer controls the color of the projection, and one controls the shakiness of the edges drawn. The arduino then relays the raw information to a laptop, which runs a processing script. The processing script captures video frames from the webcam, and attempts to draw the edges of the shadows it views from the inside of the plastic screen, and then draw lines from the center of the blobs to the outer edge (to act as a fill).
Because of the roughness of the blobs detected by the processing code, the projected image is abstract and interacts somewhat unpredictably. Shadowbox is a good proof of the concept, but could use streamlining and more accurate interpretations of the shadows. This would help to produce a more consistently reactive and abstract result. More controls could be added to give the user more options.


int colorPot=0;//determines color in Processing (float Color)
int weirdPot=0;//determines shaky-ness of edges (float Weird)

void setup(){

void loop(){
weirdPot=(analogRead(A1)+9000);//adds 9000 to variable to differentiate from colorPot
Serial.println (colorPot);
delay(50);//for stability
Serial.println (weirdPot);


import blobDetection.*;
import processing.serial.*;

Capture cam;
BlobDetection theBlobDetection;
PImage img;
boolean newFrame=false;
Serial myPort;
float Temp=0;
float Color=0;
float Weird=0;

// ================================================== setup()
void setup()
println(Serial.list());//Select serial port
myPort = new Serial(this, Serial.list()[3], 9600);
size(640, 480);
String[] cameras = Capture.list(); //Select camera
if (cameras.length == 0) {
println(“There are no cameras available for capture.”);
} else {
println(“Available cameras:”);
for (int i = 0; i < cameras.length; i++) {
cam = new Capture(this, cameras[3]); //iSight
//cam = new Capture(this, cameras[15]); //webcam
// BlobDetection
// img which will be sent to detection (a smaller copy of the cam frame);
img = new PImage(80,60);
theBlobDetection = new BlobDetection(img.width, img.height);
theBlobDetection.setPosDiscrimination(false);//"true" makes blobs favor bright areas, mostly works
theBlobDetection.setThreshold(0.8f); //detection threshold

// ================================================== captureEvent()
void captureEvent(Capture cam)
newFrame = true;

// ================================================== draw()
void draw()
if (newFrame)
background(0, 255); //background color
img.copy(cam, 0, 0, cam.width, cam.height,
0, 0, img.width, img.height);
fastblur(img, 2);

// ================================================== drawBlobsAndEdges()
void drawBlobsAndEdges(boolean drawBlobs, boolean drawEdges)
Blob b;
EdgeVertex eA,eB,vA,vB;

String inString=myPort.readString();//Read from serial port

inString = trim(inString);
Temp = float(inString);

if(Temp<9000){//filter out colorPot value, set = float Color
}else{//filter out weirdPot value, set = float Weird

for (int n=0 ; n<theBlobDetection.getBlobNb() ; n++)//blob-scanning
if (b != null)
if (drawEdges)//Edges
//====================================color scrolling
float R=0;
float G=0;
float B=0;
G=(255-R-B); //R+G+B = 256

for (int m=0;m 0){
eB.x += random(-Weird,Weird);//adds random value to edge endpoint based on float Weird
eB.y += random(-Weird,Weird);
if (eA !=null && eB !=null){
eA.x*width, eA.y*height,
eB.x*width, eB.y*height);
b.x*width, b.y*height,
eB.x*width, eB.y*height);
}//end edge drawing
}//end blob-scanning loop
// The following code is unneccesary, but adds stability to edges
// Super Fast Blur v1.1
// by Mario Klingemann
// ==================================================
void fastblur(PImage img,int radius)
if (radius<1){
int w=img.width;
int h=img.height;
int wm=w-1;
int hm=h-1;
int wh=w*h;
int div=radius+radius+1;
int r[]=new int[wh];
int g[]=new int[wh];
int b[]=new int[wh];
int rsum,gsum,bsum,x,y,i,p,p1,p2,yp,yi,yw;
int vmin[] = new int[max(w,h)];
int vmax[] = new int[max(w,h)];
int[] pix=img.pixels;
int dv[]=new int[256*div];
for (i=0;i<256*div;i++){


for (y=0;y<h;y++){
gsum+=(p & 0x00ff00)>>8;
bsum+= p & 0x0000ff;
for (x=0;x>16;
gsum+=((p1 & 0x00ff00)-(p2 & 0x00ff00))>>8;
bsum+= (p1 & 0x0000ff)-(p2 & 0x0000ff);

for (x=0;x<w;x++){
for (y=0;y<h;y++){
pix[yi]=0xff000000 | (dv[rsum]<<16) | (dv[gsum]<<8) | dv[bsum];




Final Project – Interactive Blinds – Arthur Dunne and Alex Duden

16 Dec

Sine Wave PatternLight Sensorgrasshopper screen shotFinal Project - Interactive Blinds - Arthur Dunne and Alex Duden

We designed a system of interactive blinds that reacted to light sensors, an OSC Touch on the iphone, and a sine wave animation that we created in Grasshopper. A projector was also included in our display to provide color, so this was added for only aesthetics. We started by building a frame out of two-by-fours, which held everything together. Next, we constructed the blinds out of thin balsa wood and attached wooden dowels to the ends of each blind, so that they could pivot around 180 degrees. We borrowed a pre-wired rail of servo motors from Justin, that we used to rotate the wooden blinds and was connected to an Arduino. All in all, we were able to build this on a low budget, because we already had the light sensors, grasshopper, breadboard, computer, projector, Arduino, and iphone. The only costs were the OSC Touch app for $5, and $15 worth of balsa wood.

After everything was wired to the Arduino, we uploaded the Firefly Firmata to the Arduino. We used Firefly as a way to link the Arduino to Grasshopper, and created all of our variations through this visual programming software. It took us a little while to troubleshoot the OSC Touch, because it had to be on the right channel, and share the same IP address as the computer, but the result was great. The OSC Touch allows the user to control the blinds’ position from an iphone, which could be useful in any kind of building or house.

Next, we experimented with the light sensors, and we were able to get the blinds in an open position when the light was shining on the sensor, and a closed position when it was dark. Our intention was to simulate the sun’s rays shining on the window of a house during the day, and how the blinds would respond by opening. This would allow a room to utilize the sun as a source of heating and lighting during the day and trap the heat in as the sun sets.

Finally, we created sine wave animations on Grasshopper, and connected each of them to a separate servo motor. Each sine wave animation had a different speed and degree of rotation, so that it would generate a gradual wave across the blinds. This was purely an aesthetic display as well as the projector that projected different colors onto the blinds for each application.


Homework 06 – Second Arduino Board Interacton – Sarah Wolf and Charlene Kulesa

21 Nov

Homework 06 - Second Arduino Board Interacton - Sarah Wolf and Charlene Kulesa

Potentiometer is connected to arduino board 1, controls the LED light blinking frequency on arduino board 2.

Here is the code:
int LED = 13;// setting the integer LED
int pot = 0; //analog pin used to connect the potentiometer

void setup() {
pinMode (LED, OUTPUT);// set pin 13 to output

void loop() {
pot = (analogRead(A0));
digitalWrite (LED, HIGH);// Turn LED on
delay(pot); //delay based off of potentiometer
digitalWrite (LED, LOW);//Turn LED off
delay(pot); //delay based off of potentiometer



Class Demo – Analog Digital Converter – 11-21-2013

21 Nov

Digital to Ananlog Converter_bb


Homework 05- Arduino and Processing – Arthur Dunne

14 Nov

Homework 05-  Arduino and Processing - Arthur Dunne




I connected the potentiometer to the Arduino, and then used the processing program to generate a wave pattern. I also changed the color of the stroke to blue.

import processing.serial.*;

Serial myPort; // The serial port
int xPos = 1; // horizontal position of the graph

void setup () {
// set the window size:
size(1000, 300);

println(Serial.list());// List all the available serial ports
myPort = new Serial(this, Serial.list()[0], 9600); // don’t generate a serialEvent() unless you get a newline character:

background(0); // set inital background:
void draw () {


void serialEvent (Serial myPort) {// get the ASCII string:

String inString = myPort.readString();

if (inString != null) { // trim off any whitespace:

inString = trim(inString);// convert to an int and map to the screen height:

float inByte = float(inString);
inByte = map(inByte, 0, 1023, 0, height);//map incomming value to height of screen

stroke(25, 38 , 56 );// draw the line:
line(xPos, height, xPos, height – inByte);

// at the edge of the screen, go back to the beginning:
if (xPos >= width) {
xPos = 0;
else {
// increment the horizontal position: