Reading multiple sensor data from arduino

April 22nd, 2008 by ctrlsave

I used to have this naive thinking that reading a sensor input from arduino is just a few lines of codes that I can copy and paste over and over again , probably because I worked with quite a lot of sensors in my last project “portable windows” as well, but for portable windows I was doing everything in arduino. So when I really wanted to start bringing in a few different input from the same port, I was completely stoned. Thankfully, I got myself a copy of “Making things work” by tom igoe and I saved myself back there. So i’m going to share this code with everyone, I modified it a little, its all about assigning variables so it should be easy. I would love to help if anyone needs any (not that i’m good) , but i’ll try.

here goes : processing.

import processing.serial.*;

int linefeed = 10;
Serial myPort; // The serial port

int one, two, three, four, five;

void setup()
{
size(512, 200);
// always start Minim first
println(Serial.list());

myPort = new Serial(this, Serial.list()[0], 9600);
myPort.bufferUntil(linefeed);

}

void draw(){

background(0);
if(two>0){
five=two;

}
else{
two=five;
}
println(”five =”+five);
delay(1000);
}

void serialEvent(Serial myPort){
String myString = myPort.readStringUntil(linefeed); //the ascii value of the “|” character
if(myString != null ){
myString = trim(myString);
int sensors[] = int(split(myString, ‘,’));
//now assign your values in processing

if (sensors.length == 4){

one = sensors[0];
two = sensors[1];
three = sensors[2];
four = sensors[3];

println(”one =”+one);
println(”two =”+two);
println(”three =”+three);
println(”four =”+four);

}

}

}

For arduino’s part, its per normal but when you do a serial print u need to add a “,” after each sensor’s data. And after the last println it should end with a “|” println. What this does is that it recognises every data as an input denoted by the comma and ends every loop with an “|”.

Example :

Serial.print(gas,DEC);
Serial.print(”,”);
Serial.println(retTemp, DEC);
// Serial.print(”|”);

hope that helps.

Posted in technology having no comments »

Video

April 22nd, 2008 by ctrlsave

just testing vimeo :)


Air Monsters from ctrlsave on Vimeo.

Posted in Uncategorized having no comments »

User Testing

April 5th, 2008 by ctrlsave

While doing my documentation video in school, I did some user testing with Hunping, Jiny and Alvin. Here are some results.

1. All of them felt that the spring mechanisms worked well.

2.The unit felt a little heavy at first handling but they got used to it almost immediately.

3.It felt nice to carry with the groove by the side and also the weight was gone .

Some observations on my side.

The screen looked kind of clumsy on the hand. Also it didn’t make sense to me when they had to lift their  hand after compressing it.I would simplify the process. Thus I made the decision to place the screen on the unit itself by making an additional skin for it which would fit on both the unit and possibly any part of our body.

Posted in Plans, Thoughts, process having no comments »

Completed Prototype 02.1

April 5th, 2008 by ctrlsave

cimg2667.jpg

Prototype 02

I intend to improve on it further over the next few days. Things such as the strap would definitely be improved on. I’m just going to do an initial documentation video with this .

Posted in process having no comments »

Skinning my Skeleton

April 4th, 2008 by ctrlsave

cimg2633.jpgcimg2635.jpgcimg2636.jpg

cimg2639.jpg

cimg2642.jpg

cimg2644.jpg

cimg2645.jpg

cimg2650.jpg

cimg2651.jpg

cimg2646.jpg

cimg2664.jpg

Posted in experiment, materials, process having no comments »

Laser Cut + Spring mechanism assembly

April 4th, 2008 by ctrlsave

The laser cut didn’t turn out as well as I thought it would be for the fact that there were burn marks at the edges of the wood pieces. It’s quite difficult to find a quality laser cutting service like those in the transmediale workshop.

I decided to change the sponge from the melamine white sponge to a normal dish washing sponge that I got from daiso. ( i love daiso). This sponge is easier to compress yet doesn’t lose its shape easily. I wanted to just use glue to put them together but the wood was heavier than I thought it would be. In order to build a strong structure that would not tear apart by itself, I thought it would be great to have a spine to hold these pieces and yet be compressable. I drilled four holes on each circle at the same spots and through these holes, I used a nylon string to tie each part and sponge together. This proved to be a test of patience and big mess but I managed to pull it off somehow. Attached are the photos. The glue that I used are wood glue, which worked perfectly to hold the sponge together.

cimg2601.jpg

cimg2602.jpg

Burnt edges

cimg2603.jpgcimg2604.jpg

marking out and drilling holes for spine

cimg2606.jpg

cimg2607.jpg

cimg2608.jpg

messy messy spine. one needs patience

cimg2610.jpg

The wood glue which i’m using can be found in spotlight in plaza singapura

cimg2614.jpg

cimg2615.jpg

cimg2617.jpg

completed skeleton. Waiting for the glue to dry

cimg2619.jpg

Interior view of spine

Posted in materials, process having no comments »

dot dot dot

March 14th, 2008 by ctrlsave

11 lasercutting done
11 choice of material finished
11 decision what monitor/screen will be used. where is the screen located
11 present sensors working
11 values from the object visualized in processing as a proof of concept

Posted in Plans having no comments »

Laser Cutting Services

March 14th, 2008 by ctrlsave

After much surfing, mailing, calling, I finally found a place suitable for Laser Cutting that deals with wood. Sorry Andreas, Good Strong Gum is unfortunately not strong with wood apparently. Plastic yes.

The link for this place is http://www.acmecraft.com.sg/ . They are quite cool. One domain with one photo.

Posted in materials, process having no comments »

Prototype

March 14th, 2008 by ctrlsave

Using the melamine foam, I assembled a new prototype with the skin included to test the self inflating capabilities and it worked pretty well. The next step is to laser cut my final design and start production on the actual input self-inflating unit.

proto1.jpg proto2.jpgprotousertest.jpgprotouser2.jpg

Posted in experiment, process having no comments »

Prototype Video

March 14th, 2008 by ctrlsave

Posted in experiment, process having no comments »