9/10/2010

MOVED!

MENG LI'S HOME HAS BEEN MOVED:

WWW.HUMANLYABSURD.COM

A SELECTION OF MENG LI
[李萌]'S INSTALLATIONS.

2/03/2009

animal quick note

genesis
the edge of the world is knowable??? stuffing into the rational thoughts.
Joseph Beuys "he is a language guy" his activism is conceptual
we can not escape the self-consciousness, but children can, animals can. that's our weakness as human beings.

1/27/2009

adventure

what defines an adventure?
present, now, uncertainty, intensity, start & end, concern about while aging, to see the actual...
Casanova, fantasy, adventurer,
consequence
confidence
certainty is the illusion.
a adventure fail? risky. the adventure failed when you withdraw.
adventure became addiction?
chance & accessity gambler, resist
gambler & artist
self contained, autonomous, like art. freedom.
island, continent. really large
isolated island, adventure.
when adventure gets bigger...
genius, freedom, stepping outside the ordinary, doesn't see the rule, or boundary,
u believe in nothing. the likely is becoming the unlikely...
carneval, turn up side down...
life of continuity, vs. life of adventure.
getting out of constrains...
overcoming fear, challenge oneself, disclosing your vulnerability.
can adventure be planned?

history & culture,
Victorians property of man, they don't come to a good end.

talking with others while looking around. you read
invention
norm, behavior, body grossness, living alone, no awareness, different interpretation...
what you noticed and how you interpreted it is also telling bits of you.

stranger history

invisible cities by Italo Calvino
http://en.wikipedia.org/wiki/Invisible_Cities
strangers: danger & possibility
magic, princess,...
carnival : new orealand, brazil, mask, making fun of the church, dress up, Halloween. for one moment, they can be strangers to each other.
formal introduction, unless letters reference.
questionable immigrants, no one knows how to read them.
cloth
it's not about danger, it's about how to read the strangers.
18 century theater, noisy, party. 19 century
coffee house, gossip, market price there, democracy. a public as a body of opinion.
public park

19 century
responding to the the gesture.
hat, talk, at that place, class, allow a date,
no follow through, just this moment, over!

private culture, family life, less intimate, more formalized

when cloth mass manufactured... shoes still more hand made, reading details...
how about digital revolution, even harder to read someone.

women is expected to be read as virtuous, couldn't be so fashionable. bought the dress in paris, and put into the cabinet for 2 years to wear, (people hold back, like prada bag)

not interacting, so watch and to be watched.

invulnerability, cosmopolitanism, tolerance, detective novel came at this moment, noticing the tiny details...

social climate. identify criminal

paris commu, massacred, burn all the traces, property record, but burn everything
index card, operator,
a return to make things by hand DIY, art and craft movement furniture design

healing, they wanna to wake up. phenomenology.

feeling, expressing? the expressions are from intellectuals.
film, magic, seeing a stranger at distance...
the memory of the moving camera: deconstruct film
how film can see things, how editing can change your interpretations.

1920s, stranger interactions victorias, disconnection, the sights and sounds, you are inside yourhand while walking around.

seeking out interactions shows a desire to wake up?

inattension blindness http://en.wikipedia.org/wiki/Inattentional_blindness
asking for directions, ??

how to read, how to trust, how to know they are dangerous? friend-friend recommendation.

1/23/2009

social fact: motivation

true for group may not be true for individual.
dilemma(no solution) problem
don't want to be rude, over write the intellectual decision. in competition
groups are always emotional, no purely rational.

real group: social synchronization. never solely externally purely defined. purely internal. hipsters, yuppies, only describe other people.

optional, volunteer, i am not in that group, so i don't say that.
mailing, synchronizing is better; real location, hard.

stop being aggregation, while started grouping.

cross the threshold, group fails, the group never really goes. people are busy...

curiosity group life shared understanding, individual goals and social goals

emotion outcome, make me happy. out of the transaction.

25 bucks to change the air ticket. "it's surcharge, or penalty."

regular transaction is quite emotion.

send the money =? flowers.

transactions, pollute with economic...

economy works, group couldn't just follow the economy.

social fact is nest. my wife is my wife, 10 bucks is 10 busks.

i got change back...
we are in the institution.

degree
the proof. lost the piece of paper. assuring people, certification.

character: animal, quick note

young, old... psychological comic, round : jimmy gownley :
allegory titian: www.yeatsvision.com/Daimon.html

memory, forget,
http://www.amazon.com/Botany-Desire-Plants-Eye-View-World/dp/0375501290
so the character is the left among those we experienced and filtered.
flat in reality show, character needs to be construct. constructing ourselves biography, twitter, the more stretching, the less relevant
memory was never the reality, but the constantly revolving happening , post-structuralism

how to construct a character, using just one scene/frame, simplicity : round paintings, balthus, http://coromandal.wordpress.com/2008/06/08/laziness-practiced-and-perfected/
adult, child child in adult dress, unfold the painting, props, context, jeff wall's work: http://i81.photobucket.com/albums/j220/artaddicted/MySpace%20Blog%20Images/Jeff%20Wall/JeffWall12.jpg. where does that happen? the dress? the location, the shoes? the expression, ... milk, squeeze it, it's not beer, it's milk, we expect not milk,... that's the story. because the picture is rich, so we engaged in the narrative.
http://totorogo.dyndns.org/wp-content/uploads/Murakami-Cowboy-Hiropon.jpg

cindy sherman film stills
the cowman: http://images.google.com/images?q=the%20cow%20man&oe=utf-8&rls=org.mozilla:en-US:official&client=firefox-a&um=1&ie=UTF-8&sa=N&tab=wi

http://fotiou.net/blog/2006/02/in-vivo-in-vitro.html

monster, scale, big huge bird on top of the person.

lost: infinite mirrors, luggage, small person in a big environment,

http://icanhascheezburger.com/

http://www.worth1000.com/contest.asp?contest_id=6489

dog's gesture is being recognized in our way.
bee behavior, dancing

reactions bee

12/19/2008

break the wall -- network objects

Break the Wall

collaborated with sunghun kim and elim cheng

project URL:
http://itp.nyu.edu/~ml1949/breakthewall.html

a kinetic performance of a wrecking ball hitting the wall. the performance is controlled by internet users' clicking the button on the "breakthewall" website. every 10 clicks (either 10 people from the internet clicking, or 1 person obsessively clicking 10 times) will trigger 1 hitting action. the performance will be broadcasted through ip camera to the internet. so your tiny action online will have real impact on the real life.


this is the interface you'll see in your browser, either sitting in the quiet office, in front of your depressing boss, desperately trying to find a way to escape behind your screen, or in seattle, on the bus, having nothing to do, thinking of seeing how wall is doing in new york with you iphone.

some of you may wonder where is the wall exactly, and "da da da da! "here it is!!

building process and technology

12/16/2008

So Obsessed with ______

Project Brief:

Randomness and Rhizomes

Project: Rhizome
Assignment length: 2 weeks
Due Date: Dec 1
# of collaborators: solo/duo

Make a database that tells a cinematic story. How we access it is up to you – it can be computer-based, or real-world based, or a mix.
The content and form should be working together to covey your concept.

Why random access? What advantages can this have for your concept?
Do you still use plot? Events?

I did a project called "i am so obsessed with ______" .

goal:
i want to experiment my thoughts around this obsession project, and i want to get more data from people, and use different criteria to classify those data to look at those data, e.g. emotional involvement; moral judgment, good or bad; socially acceptable or not. I wanna to make people think about their obsessions, especially for people who has obsessive compulsive disorder, who couldn't control and who blame or feel guilty for their obsessions, I want them to go through the process like a routine and take their time to classify, to think about their obsessions, are they really bad? not socially acceptable? or it's just a way how to you look at it.

form:
setting up a scene as a routine, put the objects in the right place, creating a linear space, so people come and automatically follow the rule created by the space.
creating a safe and private atmosphere(i guess i should adapt my setting coz it's not private enough)
guiding people to write down their obsessions using different colors
guiding people to put them into either good/or bad jars
turning everything complex to a cup of "tea" with color, as the Tibetan healing ceremony , mandala http://www.asia.si.edu/exhibitions/online/mandala/default.htm









feedbacks:
I got feedback from ithai, "that doesn't make sense, that's not tea" and then I started thinking about it, what if I did relate that with real tea, but use different colors of tea, mix them together and have real tea, does that make people feel more pleasant?
Also eddie said " the classification of both color/emotion and good/bad is confused". I think this performance is an experiment for me to see which is more interesting, emotion attachment or judgment on good/bad. And rating the obsession as good/bad, and attaching the obsession with emotion are two different things for me.
Marina also said "too many texts on instructions", and Allistar knew my project, having the same concern. The test in the bar showed I should definitely make it as simple as 2 steps, write and drop.
Got feedbacks from Marina and other people on using so many different colors to represent emotion. first, that's very personal; second, i have a lot "pink" and it could be biased. so maybe people will not buy the part of emotion thing.
marina also refers me to 12steps, http://www.12step.org/Forums/. That's fascinating, and I found http://www.myrecoveryspace.com/ from 12steps. I've been thinking a lot, should I continue it to make it on line? or more of a face-to-face and reallife performance thing. The good thing for this 12 steps and myrecoverspace project is it creates a empathy "We are more alike than we are different". That's great to people who need mental support.
People are interested in learning others' obsessions, especially if they know that's classified by the writer as good, even they feel that's bad "the obsessed with money one" . then the conflict creates conversation. that's what I like.
I talked with Marina about the direction of this project. I explained I am more focusing on the obsession content, on people's judgment on these obsessions, obsessions on consuming, obsessions on relationship, than the form I did. Advices from Marina are: setting up the place, more specific, asking the question more specific, setting up in a luxury mall vs. in the subway will be different, and I could get more specific obsessions from this specific group of people, and the questions could be even more constraint than right now. Getting more data from different location and different people group would be my next step. I still need to think about the form later and I also would think about involving my own stories into the performance.

12/15/2008

reading note: capital by marx

Capital

A critique of politial economy

Karl marx


Value :

Intrisic value

Use value

Exchange value


A commodity is first an external object, satisfies human needs, no matter for stomach or for brain, feeling. That's why we consume. Need more, consume more.

Emotional need, as people are obsessed with niky, gucci, apple, etc, people are emotionally obsessed with those brands, luxuries, etc. people need it, and make the exchange value increase, the higher the exchange value, the more emotionally satisfied people feel, and the more they consume, and the more people in the society consume, that's the luxury industry.


My friend told me whenever he is emotionally up/down, or feel lonely (since the capitalism society is a competitive society, and it lacks compassion and it is easy to get lonely), he buys stuff, and good stuff, spends a lot of money. Not sure if that fits to everyone in this system, but interesting point, though.


The usefulness of a thing, or a person. Social capital. Kinda sad, but that's how the society work… where is the compassion, where is the love/??


Technology reduces the labor hour, but the salary of average workers still the same, thus the remaining value workers create increase.


Where is money coming from? Coat and the linen.


The value form, the fetish, is unfamiliar, magic, animating the object.


Exchange Value cames from the social relationships between commodities.all about relationships, the global trading: export/import


The two cow joke: JAPANESE CORPORATION, You have two cows. You redesign them so they are one-tenth the size of an ordinary cow and produce twenty times the milk. You then create clever cow cartoon images called Cowkimon and market them Worldwide.

Japaness cartoon as commodity fetish.


A question, the intrinsic and use value of digital objects, e.g. email service. Or mobile service ?

The virtual QQ coin, the virtual money, as fetish objects in virtual world.


Yahoo as a corporation, putting profit as the highest priority, sacrificing customer's privacy and turned the customer, a dissent to the chinese government. In capitalism, corporation moral is to gain profit.


if table could dance, if coat could speak, uncanny.


11/23/2008

Reframe: dead leaves growing up to be flame

Project: Remix/Reframe
Assignment length: 2 weeks
Due Date: Nov 10
# of collaborators: solo/collab

"Artists today program forms more than they compose them: rather than transfigure a raw element (blank canvas, clay, etc.), they remix available forms and make use of data."

– Nicolas Bourriaud, Post-Production (p.8)

“Visual, sound, and text collage, for many centuries relatively fugitive traditions (a cento here, a folk pastiche there) became explosively central to a series of movements passing through Modernism to Postmodernism: Futurism, Cubism, Dada, Musique Concrete, Situationism, Pop, and Appropriation. In fact, collage, the common denominator in that list, might be called the art form of the 20th century, never mind the 21st. But forget, for the moment, chronologys, schools, or even centuries. As examples accumulate – Igor Stravinsky’s music and Daniel Johnston’s, Francis Bacon’s paintings, and Henry Darger’s, the novels of and the Oulipou group and of Hannah Crafts (the runaway-slave author who pillaged Dickens’ Bleak House to write The Bondwoman’s Narrative), as well as cherished texts that nonetheless tremble on the brink of outcast status for the subsequent discovery of their “plagiarized” elements, like Richard Condon’s novels and Martin Luther King Junior’s sermons – it may seem that collage and appropriation, mimicry, quotation, allusion and sublimated collaboration are the sine qua non of the creative act, a native urge cutting across all boundaries, forms and genres, across high and low, through both self-consciously sophisticated and “primitive” attempts to make those useless and essential artifacts we call culture.”

– Jonathan Letham, The Ecstasy of Influence

Ruleset: The terms of this assignment are simple.
Create a Remix, in which the content and form are reflected in each other.
The original(s) should be recognizable, but you should think about saying something new in your reframing/remixing of the original material.
As usual in ISCO, this cannot be a single channel work that appears on an unmodified screen, projection, monitor, etc.



I worked together with eddie and what we want to do is a remix of life and death, nature and civilization, the intrisic system of leaves and the system of fire, reframing the dry leaves, play with as if they are color pixels, to create a site specific nature graffiti. Also, we want to create a linear narrative, as people walking from faraway to close by, we want to play around the reversal recognition, making people feel those are leaves on actually fire, while afterward, realize that's just leaf graffiti.





This is our ideal site to put this piece.


Eddie and I tried to put it outside, but we failed due to the wind, the material.

Marina and our classmates' critique made us rethink of our project.
1, negative feeling in terms of the material: it's really true that using tape lost all the magic of this project. we missed the detail and we'd love to tie or sew the leaves on the net if we do it again, outside.
2, magic of the project: i understand that after marina pointing out the lost of the magic for our project. i feel our project is pursuing something really literal: reversal recognition, and ignore something subtle: visible vs. invisible; magic.
3, it's totally different if we put it outside, in a site, like the washington square park. that's our initial idea. we forgot to mention that. gallery setting gives people totally another experience. and we also would love people to experience in a linear way, from far, to closer, closer, so we should control the environment, so that people's interaction, distance will be controlled to fit our purpose. that's also what i see, the magic of the project, and how to play with the physical setting to affect people's behavior.

10/22/2008

Pineapple Man with the Earphone and a Piece of Newspaper

Beauties, Specters, and Monsters

Project: Portrait of…

Intro:
Character. Archetype vs. stereotype vs. individual. Cardboard character. Fully fleshed out character.

This next assignment focuses on the challenges of character development. Much of a character’s depth is realized through a combination of its actions, interactions, and supplementary behaviors.
In cinema, a character unfolds over time.
A character is revealed by his/her/its actions.
In media or installation, a character often has to reveal itself in new ways that are non-linear or multi-linear.
Every work – whether that is a Kleenex box, a doorknob, a mascot, or a story’s protagonist has a character to it, that’s made up of its material, content, expression, and environment. This assignment should bring your scrutiny of all the elements that comprise character to the foreground.
Ruleset:
Create a portrait. It could be a real or fictional character, or a chimera – a mythical composite beast.
Your project must contain two or three distinct points of view (literal views, time frames, scales, positions, perspectives, or opinions).
Components: 2-3 screens, 2-3 soundtracks, or 2-3 objects or forms. You must make multiples of the same type of medium (i.e. all screens, all toys, all tape decks, all talking shoes).
Ancillary material: Accompanying this should be a 1-3 paragraph character description. You should draw from the character shopping list or hand-out on characyter development. You will make this available to the class.
Questions: What is the central problem or thesis the character wishes to express?
How is your portrait cinematic? Are you dealing with color, tempo, lighting, atmosphere, and scene to help give a sense of this persona?
How are you characterizing your subject? How is she/he/it round, not flat?
Are you alluding to any particular narrative genres?
What are we gaining in character depth, contradiction, or narrative viewpoints from having more than one perspective? How do multiple viewpoints or iterations help make your character “round?”

---- by Prof. Marina Zurkow

For my Interactive Screen and Cinematic Object class, I created a character: Pineapple Man with the Earphone and a Piece of Newspaper.






An old man, sitting on a bench in Washington park in the dark area under the tree, really faraway to see clearly except that his size is big, and he is holding a newspaper, covering his face. Walking closer by, his face is sort of greenish, seems really not smooth at all, with a pair of dark sun glasses, you know, it 's night time… I say "hi" to him, seems he doesn't hear. Oh… I see, he has a big black earphone covering his ears and a piece of "New York Times" in hand. Seems a knowledgeable professor in Politics or Law or Business, I don't know.

While getting closer to him quietly seems doesn't bother him. He is too focus to even notice me.

He keeps nodding as if he reads something important or hears something satisfying. What is he reading and listening?


"Many Health in Disclosure of Nominees’ Holes

By Lawrence Altman

The limited candidates provided by the information is a striking campaign from recent departure in a year when their significance carries extraordinary health... "



Audience Reaction and Critique


After encountering with my pineapple man, audience associated the character with different figures: old man sitting in the park, vacation guy relaxing, woman in 80's since the sun glasses look like that period, or could be anyone... Whether the character is a male or female?
Actually, it is a type of people. It actually could be anyone. That's actually my reflection after the critique. But while before the critique, in order to make my character specific and easy to recognize and describe, I want to make the character as an old man as a professor or so. The problems with this character is (from marina and my classmate's critique) :

1, pineapple associates with vacation, Hawaii, and party. as marina and others pointed, as a sculpture, audience always tries to find the symbolic feature and each of them will affect how they perceive the sculpture. I totally feel I should make decisions by putting myself into the role of the audience, coz this pineapple, for me , i associate it with ugly figure, and it seems just me. so to improve the project, also to reflect "it could be everyone or part of everyone" I want to replace the pineapple with a white ball, generic face; OR I want to create 3 or 4 fruit heads, e.g. pineapple, banana, and watermelon. First to make people think that's actually not just this figure, but different people that could belong to this type. Second, to reduce the association of pineapple.


2 sun glasses should be selected carefully. again, that plus the pineapple makes the character more like a vacation guy to the audience.

3 the newspaper: I am happy most of people got the idea and burst into laugh after reading it. the sound: radio news . some people got it, while others didn't hear anything strange. Hulya burst into laugh when she posited the earphone and she pointed out the interesting thing was she realized she was in a conversation with a pineapple. Steven piointed out the consistancy between the newspaper's nonsense and the radio's nonsense. Some people feel the character is making an ironic statement on politics, and Marina feels the character is an alien or a blind voter trying to figure out the "no-way-to-understand" election, I thought that's interesting and also Jose said, that is same as the financial crisis, no one understands what's on the news. The funny thing is people have intepreted what they heart and seen in very different ways. My description of the character is types of people who pretend to care about the news, but actually he/she doesn't understand what's going on. I want to produce many reversal recognitions for audience, and to create the "ah ha, oh, he is such a character that different from what I saw him before reading what he reads and listening to what he listens to" I realized because of it is a newspaper, the contend also matters. I in fact, just want to use the form to show the non-sense, but since the content is about election, people will of course associate the theme with elections. That's another thing I should be careful. On one hand, I could take advantage of the content, and on the other hand, if I don't want people to associate with the content, I should make the paper less specific, not a new york times or so.


10/02/2008

weather map --- 1945 / 1985 sihe garden


please click to view the bigger picture

The garden is called Sihe Garden, in Beijing. The picture above was my grandpa's parents' house, with different rooms which my grandpa, his brothers, his sisters lived. Different rooms have different conditions and could only be used by certain people, e.g. my grandpa's sisters can not live in the position where my grandpa lives. Different rooms represented how high the status was. Parents were living in the middle main room. The oldest son of the family was No.1, living in the left wing of the garden, then the second son, living in the right wing. And sisters can only live in the backyard. The weather refers to their status.

The picture below was the same house, but in 1985. The change of the society affected the use of the garden. There were different families SHARING this garden, and they were under different family names. There were no "higher, lower" statues anymore and basically, everyone was equal and the same.

In terms of the narrative, the important nformation on the corner was missed by most readers. It's better to use diferent fonts.

butt-on pong controller

Pong Game

instructions:
1, sit on my special chair
2, press the square button to start the game
3, shift body to press the left button by left butt/right button by right butt ( when left button is pressed, the bar on the screen will move left/vise versa)
4, to control the bar to hit the ball

the chair with buttons:


under the chair, xport direct, arduino, and indication leds:








/* Code by Meng Li based on Tom Igoe's makingthingstalk
Pong client
Language: Wiring/Arduino

This program enables an Arduino to control one paddle
in a networked Pong game. This listing uses the readSensors()
method from the seesaw client in project #7.
*/

// Defines for the Lantronix device's status (used for staus variable):
#define disconnected 0
#define connected 1
#define connecting 2

// Defines for I/O pins:
#define connectButtonPin 9
#define rightLED 3
#define leftLED 4
#define connectionLED 11
#define connectButtonLED 12
#define deviceResetPin 7
// variables:
int inByte= -1; // incoming byte from serial RX
int status = disconnected; // Lantronix device's connection status

// variables for the sensors:
byte connectButton = 0; // state of the exit button
byte lastConnectButton = 0; // previous state of the exit button
/*
When the connect button is pressed, or the accelerometer
passes the left or right threshold, the client should send a message
to the server. The next two variables get filled with a value
when either of those conditions is met. Otherwise, these
variables are set to 0.
*/
byte paddleMessage = 0; // message sent to make a paddle move
byte connectMessage = 0; // message sent to connect or disconnect


void setup() {
// set the modes of the various I/O pins:
pinMode(connectButtonPin, INPUT);
pinMode(rightLED, OUTPUT);
pinMode(leftLED, OUTPUT);
pinMode(connectionLED, OUTPUT);
pinMode(connectButtonLED, OUTPUT);
pinMode(deviceResetPin, OUTPUT);

// start serial port, 9600 8-N-1:
Serial.begin(9600);

// reset the Lantronix device:
resetDevice();
// blink the exit button LED to signal that we're ready for action:
blink(3);
}

void loop() {
// read the inputs:
readSensors();
// set the indicator LEDS:
setLeds();
// check the state of the client and take appropriate action:
stateCheck();
}

void readSensors() {
int left = digitalRead(8);
delay(10);
int right = digitalRead(6);
delay(10);
if (left > right) {
paddleMessage = 'l';
}
else if (right >left) {
paddleMessage = 'r';
}
else {
paddleMessage = 0;
}

// read the connectButton, look for a low-to-high change:
connectButton = digitalRead(connectButtonPin);
connectMessage = 0;
if (connectButton == HIGH ) {
if (connectButton != lastConnectButton) {
// turn on the exit button LED to let the user
// know that they hit the button:
digitalWrite(connectButtonLED, HIGH);
connectMessage = 'x';
}
}
// save the state of the exit button for next time you check:
lastConnectButton = connectButton;
}
void setLeds() {
// this should happen no matter what state the client is in,
// to give local feedback every time a sensor senses a change

// set the L and R LEDs if the sensor passes the appropriate threshold:
switch (paddleMessage) {
case 'l':
digitalWrite(leftLED, HIGH);
digitalWrite(rightLED, LOW);
break;
case 'r':
digitalWrite(rightLED, HIGH);
digitalWrite(leftLED, LOW);
break;
case 0:
digitalWrite(rightLED, LOW);
digitalWrite(leftLED, LOW);
}

// set the connect button LED based on the connectMessage:
if (connectMessage !=0) {
digitalWrite(connectButtonLED, HIGH);
}
else {
digitalWrite(connectButtonLED, LOW);
}

// set the connection LED based on the client's status:
if (status == connected) {
// turn on the connection LED:
digitalWrite(connectionLED, HIGH);
}
else {
// turn off the connection LED:
digitalWrite(connectionLED, LOW);
}
}
void stateCheck() {
// Everything in this method depends on the client's status:
switch (status) {
case connected:
// if you're connected, listen for serial in:
while (Serial.available() > 0) {
// if you get a 'D', it's from the Lantronix device,
// telling you that it lost the connection:
if (Serial.read() == 'D') {
status = disconnected;
}
}

// if there's a paddle message to send, send it:
if (paddleMessage != 0) {
Serial.print(paddleMessage);
// reset paddleMessage to 0 once you've sent the message:
paddleMessage = 0;
}
// if there's a connect message to send, send it:
if (connectMessage != 0) {
// if you're connected, disconnect:
Serial.print(connectMessage);
// reset connectMessage to 0 once you've sent the message:
connectMessage = 0;
}
break;

case disconnected:
// if there's a connect message, try to connect:
if (connectMessage !=0 ) {
deviceConnect();
// reset connectMessage to 0 once you've sent the message:
connectMessage = 0;
}
break;
// if you sent a connect message but haven't connected yet,
// keep trying:
case connecting:
// read the serial port:
if (Serial.available()) {
inByte = Serial.read();
// if you get a 'C' from the Lantronix device,
// then you're connected to the server:
if (inByte == 'C') {
status = connected;
}
else {
// if you got anything other than a C, try again:
deviceConnect();
}
}
break;
}
}

void deviceConnect() {
/*
send out the server address and
wait for a "C" byte to come back.
fill in your personal computer's numerical address below:
*/
Serial.print("C128.122.151.168/8080\n\r");
status = connecting;
}

// Take the Lantronix device's reset pin low to reset it:
void resetDevice() {
digitalWrite(deviceResetPin, LOW);
delay(50);
digitalWrite(deviceResetPin, HIGH);
// pause to let Lantronix device boot up:
delay(2000);
}

// Blink the connect button LED:
void blink(int howManyTimes) {
for (int i=0; i< howManyTimes; i++) {
digitalWrite(connectButtonLED, HIGH);
delay(200);
digitalWrite(connectButtonLED, LOW);
delay(200);
}
}

9/16/2008

tickle me!







code in arduino:

int switchPin = 3; // assign a pin for the switch
int LEDPin = 13; // select the LED pin
int state = 0;

void setup() {
//initialize the serial
Serial.begin(9600);
pinMode(switchPin, INPUT); // declare the switchPin as an INTPUT
pinMode(LEDPin, OUTPUT); // declare the ledPin as an OUTPUT
}

void loop() {
state = digitalRead(switchPin);
digitalWrite(LEDPin,state);
Serial.print(state,BYTE);
}

code in processing:
import processing.serial.*;
import pitaru.sonia_v2_9.*;

Sample mySample;
Serial myPort;
int inByte;

void setup(){
println(Serial.list());
myPort = new Serial(this, Serial.list()[1], 9600);
// size(50,50);
Sonia.start(this); // Start Sonia engine.
mySample = new Sample("giggle.wav");

//inByte=1;
}

void draw(){
if(inByte==1){

println(" playing");
if(!mySample.isPlaying()){
mySample.setVolume(20);
mySample.repeat();

}
}
else{
println("no playing");
// if(mySample.isPlaying()){
mySample.stop();
// }
}

}

// background(255);
/*
if(mySample.isPlaying()){
background(0,40,0);
}
*/




void serialEvent(Serial myPort){
// while(myPort.available()>0){
inByte = myPort.read();
println(inByte);
}



// Safely close the sound engine upon Browser shutdown.

public void stop(){
//Sonia.stop();
myPort.stop();
super.stop();


}

4/23/2008

Actions Events Filtering

Using self-setting threshold to filter data and trigger event : heart beat.



Code:

arduino:

/* I AM ALIVE heart beat led
* by meng li based on the code by Jeff Gray - 2008
* ----------------
* Triggers a one time event when value goes over threshold,
* and a different trigger once the value goes back below the threshold
*/

int an1,an2 = 0;
int redLedPin =13;
boolean triggered = false;

void setup(){
Serial.begin(9600);
pinMode(redLedPin, OUTPUT); // set the red LED pin to be an output
// Serial.println("Starting");
}
void loop(){
// read analog value in
int an2 = analogRead(0);
Serial.print("Y");
Serial.println(an2,DEC);
//threshold
int an1= analogRead(5);
Serial.print("X");
Serial.println(an1,DEC);


if(an1 > an2 && !triggered){
triggered = true;
digitalWrite(redLedPin, HIGH); // turn off the red LED
}
if(an1 <= an2 && triggered){
triggered = false;
digitalWrite(redLedPin, LOW); // turn off the red LED
}
}

processing:

import processing.serial.*;

String buff = "";
int val = 0;
int NEWLINE = 10;
int xPos,yPos,zPos = 0;
int displaySize = 2;
int an1, an2, an3;
//an1 pot; an2 ir;

Serial port;

void setup(){
background(80);
size(800,600);
smooth();

port = new Serial(this, Serial.list()[1], 9600);
}

void draw(){
// new background over old
fill(80,5);
noStroke();
rect(0,0,width,height);

// wipe out a small area in front of the new data
fill(80);
rect(xPos+displaySize,0,50,height);

// check for serial, and process
while (port.available() > 0) {
serialEvent(port.read());
}

}


void serialEvent(int serial) {
print("A"); //header variable, so we know which sensor value is which
println(an1); //send as a ascii encoded number - we'll turn it back into a number at the other end
//Serial.print(10, BYTE); //terminating character

print("B"); //header variable, so we know which sensor value is which
println(an2); //send as a ascii encoded number - we'll turn it back into a number at the other end
//Serial.print(10, BYTE); //terminating character


if(serial != '\n') {
buff += char(serial);
}
else {
int curX = buff.indexOf("X");
int curY = buff.indexOf("Y");


if(curX >=0){
String val = buff.substring(curX+1);
an1 = Integer.parseInt(val.trim());

xPos++;
if(xPos > width) xPos = 0;

sensorTic1(xPos,an1);
}
if(curY >=0){
String val = buff.substring(curY+1);
an2 = Integer.parseInt(val.trim());

yPos++;
if(yPos > width) yPos = 0;

sensorTic2(yPos,an2);
}

// Clear the value of "buff"
buff = "";
}
}

void sensorTic1(int x, int y){
stroke(0,0,255);
fill(0,0,255);
ellipse(x,y,displaySize,displaySize);
}

void sensorTic2(int x, int y){
stroke(255,0,0);
fill(255,0,0);
ellipse(x,y,displaySize,displaySize);
}