Our team
We were divided into groups of three, a senior with a batch-mate of mine. We decided to make wind sensor that would detect the speed at which the wind is blowing and use the data generated by it to give a graphical interface that fluctuates with variations in wind speeds.
This final product is available at the following link:-
Project Details
Piece of Art
We were introduced to a java based programming application called “Processing”. Using which we can make simple programs. As a introductory exercise we were asked to recreate a Piet Mondrian painting. Since the painter primarily used lines and colors to make his art, it was easy for us to recreate his paintings using the code.
Painting I selected
Processing code for replication
void setup()
{
int x=300;
int y=300;
size(x,y);
background(255);
}
void draw()
{
int x=300;
int y=300;
strokeWeight(4);
line(40,0,40,300);
strokeWeight(3);
line (120,0,120,300);
strokeWeight(3);
line(220,0,220,300);
strokeWeight(3);
line(120,170,300,170);
line(0,70,300,70);
fill(0,0,255);
rect(220,170,160,130);
fill(0,0,0);
rect(90,260,210,40);
fill(255,255,0);
rect (0,230,120,60);
fill(255,0,0);
rect(0,0,120,100);
fill(70,70,70);
triangle(0,0,150,0,0,150);
triangle(150,0,300,0,300,150);
triangle(300,150,150,300,300,300);
triangle(0,150,0,300,150,300);
}
Final Output

The Key Finder
This individual project was focused on a scenario in which using the various devices we were asked to formulate an interaction. I decided to develop a system that allowed people to keep track of miscellaneous items that they misplace and spend a ridiculously large time finding them.
Project details and a video to explain the scenario are available at the link blow:-
Click here
Arduino
Initially we were made to let go of the way we treat our keyboard as a means of typing stuff into the computer but were asked to think of it as a input device using which anything that is able to interact with the keyboard is able to interact with the system. (As part of which we developed a wind sensor)
Later on we were asked to do the other ways i.e. allowing the computer to send out analog signals for a reverse interaction with the outside world.(The Key finder is one such device).
Now the electronics were taken a step further and we were introduced to the Arduino chip- Arduino is a physical computing platform based on a simple I/O board and a development environment that implements the Processing/Wiring language. Arduino can be used to develop stand-alone interactive objects or can be connected to software running on a computer (e.g., Macromedia Flash, Processing, Max/MSP, Pure Data, SuperCollider). Currently shipping versions can be purchased pre-assembled; hardware design information is available for those who would like to assemble an Arduino by hand.
A basic assignment on Ardunio was to burn a program onto the microprocessor to make a LED blink on the circuit board.
The ardunio code is given below:
/*
This program makes an LED blink on the arduino board.
*/
int ledPin = 13; // LED connected to digital pin 13
void setup() // run once, when the sketch starts
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
}
void loop() // run over and over again
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
}
Arduino
The first of the interactions with Arduino was to transfer signal from computer to the chip through serial port.
The code is given below:
Arduino Code:
int outputPins[] = {3,4,13};
//int outputPin = 13;
int val;
void setup()
{
Serial.begin(9600);
pinMode(outputPins[0], OUTPUT);
pinMode(outputPins[1], OUTPUT);
pinMode(outputPins[2], OUTPUT);
}
void loop()
{
if (Serial.available()) {
val = Serial.read();
if (val == 'a') {
digitalWrite(outputPins[0], HIGH);
delay(1000);
}
if (val == 'b') {
digitalWrite(outputPins[1], HIGH);
delay(1000);
}
if (val == 'c') {
digitalWrite(outputPins[2], HIGH);
//delay(1000);
}
if (val == 'e') {
digitalWrite(outputPins[0], LOW);
digitalWrite(outputPins[1], LOW);
digitalWrite(outputPins[2], LOW);
}
}
}
Processing Code:
import processing.serial.*;
Serial port;
void setup()
{
size(200, 200);
println(Serial.list());
// Open the port that the Arduino board is connected to (in this case #0)
// Make sure to open the port at the same speed Arduino is using (9600bps)
port = new Serial(this, Serial.list()[1], 9600);
}
int value =0;
void draw()
{
fill(value);
rect(50,50,50,50);
}
void keyPressed() {
if (key == 'a' || key == 'A') {
value =255;
port.write('a');
}
if (key == 'b' || key == 'B') {
value= 200;
port.write('b');
}
if (key == 'c' || key == 'C') {
value=110;
port.write('c');
}
}
void keyReleased() {
value=0;
port.write('e');
}
Arduino
Arduino Code: Photosensor
int potPin = 2; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int val = 0; // variable to store the value coming from the sensor
void setup() {
pinMode(ledPin, OUTPUT); // declare the ledPin as an OUTPUT
Serial.begin(9600);
}
void loop() {
val = analogRead(potPin); // read the value from the sensor
digitalWrite(ledPin, HIGH); // turn the ledPin on
delay(val); // stop the program for some time
digitalWrite(ledPin, LOW); // turn the ledPin off
delay(val); // stop the program for some time
Serial.print(val);
}
Processing Code:
import processing.serial.*;
Serial port;
int Length = 200;
int Width = 300;
void setup()
{
println(Serial.list());
size (Width, Length);
background(0,0,0);
port = new Serial(this, Serial.list()[1], 9600);
// frameRate(10);
}
int value =255;
void draw() {
fill(255);
rect(50, 50, 200, 100);
int val = port.read();
println(" " + val + " ");
fill(val);
rect(50, 50, 200, 100);
}