Monday, April 28, 2008

Code and Motion

Read this document on Scribd: Elevator Programming Code


The elevator code trials made use of several online tutorials and expertise from forum members in the Arudino Online forum, the Ladyada Forum and the Maker forum. The above PDF demonstrates over 3 months worth of continuous research and revision- testing code, inserting code libraries, learning and tweaking. It's still not perfect. The elevator motion began with a hunch-- that is, I could move the elevator using stepper motors controlled by push button switches on a shift register. The idea of the shift register came from the SHIFTIN tutorial written by Carlyn Maw and Tom Igoe.

The last pages of the .pdf contain the final code used to run the elevators.

UPDATE:

The elevators preform based on these evolved behaviors which have been programmed into the elevator code and into the elevator's interface. The following pseudo-code depicts the behaviors most interesting to me and most relevant to the site.


A. elevator_love_letters
Baudelaireʼs poem “ A une Passante” illustrates the essence of modern love, one
which is no longer dependent on the notion of being mythically fated for one
another, but rather, on a chance encounter within the bustle of the big city. The
ups and downs of love merge with the to and fro of traffic. The hero and heroine
fear to loose sight of one another. The chase with the taxi no longer exits, only
up and down from floor to floor.
Charles Baudelaire: Les Fleurs de Mal et autre poemes, Paris, 1964. P 114

Elevator Function:
if switchvar2== n
do
move both freight and passenger elevator in a game of tag. Move passenger to
floor 2 then freight, then pass to 3 then freight to 3 and the 4 and so on until they
both stop at the 6 floor , delay 500ms, and return to the first floor
check the shift register for next call

B. bureaucratic_prostition
In the pre-lift age the blue collar worker occupied the poorly furnished attic room.
High society, on the other hand, resided in the lower storeys of the building. That
gravity could be comfortably overcome by lift led to a re-evaluation of these
physical constructs. The person who was “on top” could live at “the top”. The
vertical polarizations of social hierarchy and of the real world became
synchronous resulting in a new topsy-turvy world.

C. Co-ordinates_of_social_space.
The skyscraper is a social microcosm revealing the deformations of its residents.
The floors become rigidly separate levels of a social hierarchy, connected by the
elevator alone. The elevator maps coordinates in social space. The system is
made up of lower floors with oppressive ceilings and spacious upper floors of the
executive class.

Elevator Function:
if switchvar==
passenger elevator go to floor 3, delay, go to floor 3.5, delay, go to floor 4, delay,
go to floor 2, delay. Continue cycle 3 times and then return to ground floor.
check the shift register for next call

D. make_nice
Elevators have become ubiquitous. Not only are they a functional necessity, but
they pervade our social and cultural life as well. We have developed extensive
social conventions as a way of dealing with them, from where to stand in a
crowded elevator to where to stand when only a stranger is present.

Elevator Function:

If swichvar2=
Passenger_motor go to floor eight and stay there and loop forward one step and
back one step (like a hover) for 300 loops
check the shift register for next call

E. the_fear
"I hate to say this, but this place is getting to me. I think I'm getting the fear"
The tendency towards free-fall as a catastrophic occurrence.

Elevator Function:
passenger_motor
increase rpmʼs move fast to top floor, delay, move fast to bottom floor and reset
rpm's to normal
check the shift register for next call

F. gateway_to_the_soul
Juxtaposition of the banal and the metaphysical trans-dimensional portal.
"Welcome to the New Jersey turnpike".

Elevator Function:
if switchvar =
passenger_motor floorcount 7.5
check the shift register for next call
freight elevator== go to missing floor 4

G. We_have_a_situation_here
The breakdown of lift systems offers the opportunity to occupy areas of the
building meant for machines. Building penetration and invasion occurs through
the labyrinths of shafts that offer protection by their darkness. The urban jungle
as an interior space.

Elevator Function:
If switchvar =
Send passenger_motor to basement, send motor_freight to floor 8, then reverse
it so that passenger_motor goes to 8 and motor_freight goes to B.

I. The_end_of _the_world
Nowhere is the dependency on the function of everyday mechanics as invisible
as it is in the elevator building. Technology runs amok.

Elevator Function:
If switchvar =
Motor_passenger and motor_freight
Go to basement then up a bit, then to basement, delay, then up a bit, then back
to basement—keep going for 3 minutes—keep looping for 3 minutes

J. Pages_from_a_diary
The experienced urbanist views the journey upward without danger, getting stuck
is a harmless, erotic moment. Disturbances and confusions in the vertical can
delay the course of love but never ruin it

Elevator Function:
If switchVar2=
Motor_Passenger and Motor_Freight travel to floor 5 and hover and pulse up and
down a few steps 5 minutes.
Delay [long time?]
Check Shift Register for next call.

Wednesday, April 16, 2008