Skip to content


Programming your Arduino with a DKU-5 cable

We are going to make an FTDI cable for whatever reason you might need one, I will use it to program my own ATMEGA microcontrollers without an arduino board. The Arduino has a USB adapter on it bu ATMEGAs do not come with that, and you need to somehow connect those to the computer - this is it. You might have seen them before, Sparkfun carries them, as well as LadyAda. The cost is a bit high and shipping takes time, and most importantly it's no fun compared to making your own.

Materials needed:

DKU-5 cable (CA42 also works, I believe Prolific makes those)

Multimeter

4 pin male header

Something to cut and strip wires

Soldering materials (iron, solder, wick...)

DKU-5 Connectivity Adapter Cable

DKU-5 is an old Nokia usb cable adapter and has the chip we want inside, no point in going into details right now about that. You can find the cable in ebay, dealextreme or local stores. I got mine from a local store. It should cost around $3 a piece. It's phone end has 6pins and the other end is the USB.

Connect the cable to your computer and find the right drivers for it, it should show up under LPT&COM ports with a port number such as USB Connectivity Adapter COM19. COM19 is the Serial Port you will choose in your Arduino IDE while uploading your programs, note that down as well.

We need to identify which pin is RX, TX, 3.3V (there are also 5V ones) and GND so we cut cable off near the phone end and strip the 6 wires inside it. Now, test the connectivity with a multimeter on those pins and find out which cable goes to what pin. Write those down. If you have a Pinout sheet for the cable, you already have which color cable is RX, TX, 3.3V/5V and GND.

off with it's head

set to buzzer

If not, we move on to the next step where we strip the chip on the USB end. Carefully cut away the plastic casing and strip the horrible dark gray plastic off the chip on the USB end.

 

You will find a PCB with the chip on it. On the PCB, where the cables are connected, you can see the pins labeled as RX, TX, 3.3V/5V and GND. If you are lucky, you'll also fin a DTR cable which goes to your Arduino's reset pin, saving you from manually pressing the reset button everytime you upload a new program.

RX, TX and 3.3V

 

Now, considering you did not have a pinout of the cable, you can identify which color cable is what, write those down somewhere and get a 4 pin header for soldering the wires on.

 

Solder the wires on your header and stick them on a breadboard. With some wires, connect the RX to your Arduino's RX, TX to your Arduino's TX, 3.3V/5V to your Arduino's 3.3V/5V and GND to your Arduino's GND.

hot glue over the chip

arduino setup

ignore the potentiometer

 

Launch your Arduino IDE, select the correct COM port & board and open up the Blink example so you do not need any LEDs to test it. The small LED on the Arduino board, next to the digital pin 13 marked as 'L' blinks each second if you upload this program. When uploading your program, push the reset button right after it compiles (it is hard to describe the timing, try different push delays if it doesn't work) and it should work.

 

Hope that helps :)

 

Posted in Hacking, Physical Computing, Tutorial.

Tagged with , , , , , , .


Navigable Space in Digital Environments (W.I.P.)

Lev Manovich's Navigable Space

Manovich suggests that computer games1 as well as bringing new aesthetic forms, they give rise to new aesthetics of navigation (Manovich, 2001). While Doom (Id Software, 1993) has the user running through a maze-like level in a fast pace Myst(Cyan,1993) allows the user to explore the world around her. Manovich points out that, these games place the user in a place in the story at the beginning of the game as well as in a spatial place. The user has to explore most of the game's environments before she can reach a narrative end, since the game goals are completed and the story is retold by navigating through the 3D space efficiently (solving puzzles, defeating monsters) rendering the storyworld and the gameworld intertwined, the navigable space being the glue between the two.

Murray's Digital Environments' Spatiality

According to Murray, one of the four properties of digital environments2 is spatiality(Murray, 1997). While traditional media can convery information that would represent an environment, only interactive, navigable spaces allow us to roam as we choose in these representations. The interactively navigable nature of space represented in digital environments sets it apart from the representations of space in other media by giving us a sense of being at a point in a particular space by responsing to our input accordingly.

The perception of events by the user is also different than other media. She suggests that in theater, the events are happening on stage and you, as the spectator, merely watch – while in interactive navigable spaces there is a more dramatically engaging spectacle, you make the events in the virtual world happen and they happen to you. This gives the navigation dramatic power. (Murray 1997)

Murray's Pleasures of Navigation

As Murray defined earlier as a characteristic of digital environments, spatial navigation can be pleasurable in-itself regardless on the contents of the said environments and the mechanics of the game that contains them. Intentional navigation, is a participatory pleasure just like the sport of orienteering where people traverse an area based on clues such as landmarks.

Murray identifies two different configurations for orienteering in electornic environments; the solvable maze and the tangled rhizome.

The Story in the Maze

The maze has a place in Greek mythology, Daedalus builds King Minos of Crete a Maze to contain the deadly Minotaur. Theseus is the hero in the story that slays the beast by succesfully navigating the maze. “The adventure maze embodies a classic fairy-tale narrative of danger and salvation. Its lasting appeal as both story and a game pattern derives from the melding of a cognitive problem (finding the path) with an emotionally symbollic pattern (facing what is frightening and unknown.) ” (Murray, 1997). The maze, Murrey says, is a road map for telling this story.

On electronic narratives, the maze is a space where you can interact with other characters and objects and if need be, you can retrace your steps back to a point where you missed something, like Ariadne's thread.3

The drawback of a maze structure in narrative environments is that “it moves the interactor toward a single solution, toward finding the way out. The desire for agency in digital environments makes us impatient when our options are so limited.”(Murray, 1997)

The Rapture of the Rhizome

Rhizomes4 are structures that any of it's points can be connected to any other point in it. This makes the stories that embody this structure solutionless. Murray suggests that the rhizome structure does not empower the user because of the fact that the user can not mark a lexia5 as read or mark a lexia so it can be accesed easily later in the reading process (Murray,1997). Despite the argument against the rhizome structure and the user's power over navigation, Murray suggests that these unsolvable mazes does have to potential to serve as an expressive structure:

“Walking through a rhizome one enacts a story of wandering, of being enticed in conflicting directions, of remaining always open to surprise, of feeling helpless to orient oneself or to find an exit, but the story is also oddly reassuring. In the rhizome, one is constantly threatened but also continuously enclosed. The fact that the plot will not resolve means that no irreparable loss will be suffered.” (Murray, 1997)

Murray differs games from stories as placing the user as the protagonist in the story and identifies a flow of plot that is embodied in game narratives. One of the points she identifies goes as:

  • “I encounter a world in pieces and assemble it into a coherent whole.”

By succesfully navigating through the environment and traversing one level after another, the user assembles a world in pieces into a coherent whole. This is much like constructing a story in one's mind from the given plot points.

 

 

 

1Computer games exemplfying the potential of new media's aesthetic power.

2Digital environment are in context of medium and not refer to spatial environments in this case.

3Ariadne's thread is what Theseus uses to navigate the maze where the Minotaur dwells in the Greek myth mentioned earlier.

4 “Rhizome” is used here as Deleuze defines it - “theory and research that allows for multiple, non-hierarchical entry and exit points in data representation and interpretation”(http://en.wikipedia.org/wiki/Rhizome_(philosophy) 

5 Barthes definition of lexia is a brief contiguous fragment – a reading unit.


Posted in Academic, Thesis.

Tagged with , , , , .


Automata Pattern

Based on Conway's Game of Life. After 300-something generations you get this:









and here's the code:

 
int cellsize=1;    //cellsize d'uh
int padding=0;
 
int docwidth=400;
int docheight=400;
 
int rows=docheight/cellsize;        //rows d'uh
int columns=docwidth/cellsize;     //columns d'uh
 
int generations=0;
 
Cell c;
 
Cell[][] cells=new Cell[columns][rows];
Cell[][] temp=new Cell[columns][rows];
 
int [][] universe=new int [columns][rows];
 
void setup(){
 
  docwidth+=columns*(padding)+padding;
  docheight+=rows*(padding)+padding;
 
  size(docwidth,docheight);
 
  for(int i=0;i
<columns;i++){
   for(int j=0;j<columns;j++){
    universe[i][j]=int(random(0,10)%2);    //fill array with 1s and 0s
   }
  }
 
  for(int i=0;i<columns;i++){
   for(int j=0;j<rows;j++){
    //cells[i][j]=i*j;
    c=new Cell(i*(cellsize+padding),j*(cellsize+padding),cellsize);
    cells[i][j]=c;
    temp[i][j]=c;
 
   }//endof for
  }//endof for
 
}//endof setup
 
void checkNeighbors(){
   for(int i=1;i<columns-1;i++){
     for(int j=1;j<rows-1;j++){
      if(cells[i][j-1]._life)   cells[i][j]._neighbors++;
      if(cells[i][j+1]._life)   cells[i][j]._neighbors++;
 
      if(cells[i-1][j-1]._life) cells[i][j]._neighbors++;
      if(cells[i-1][j+1]._life) cells[i][j]._neighbors++;
      if(cells[i-1][j]._life)   cells[i][j]._neighbors++;
 
      if(cells[i+1][j-1]._life) cells[i][j]._neighbors++;
      if(cells[i+1][j+1]._life) cells[i][j]._neighbors++;
      if(cells[i+1][j]._life)   cells[i][j]._neighbors++;
     }
   }
 
}
 
void resetNeighbors(){
 for(int i=1;i<columns-1;i++){
     for(int j=1;j<rows-1;j++){
      cells[i][j]._neighbors=0;
     }
    }
 
}
 
void conway(){
  for(int i=1;i<columns-1;i++){
     for(int j=1;j<rows-1;j++){
       if(cells[i][j]._life&&cells[i][j]._neighbors<2) {temp[i][j]._life=false; }
       else if(cells[i][j]._life&&cells[i][j]._neighbors>3){ temp[i][j]._life=false; }
       else if(!cells[i][j]._life&&cells[i][j]._neighbors==3){ temp[i][j]._life=true; }
       else{
        cells[i][j]=temp[i][j] ;
       }
     }
  }
 
 // Cell[][] buffer = cells;
 
  for(int i=0;i
<columns;i++){
   for(int j=0;j<rows;j++){
 
    if(temp[i][j]._life) universe[i][j]=1;
    else universe[i][j]=0;
 
  if(universe[i][j]==1){
      cells[i][j]._life=true;
    }//endof if
    else{
       cells[i][j]._life=false;
    }
    }
  }
 
}
 
void draw(){
  delay(40);
  checkNeighbors();
  conway();
 
  generations++;
  save("pattern"+generations+".png");
 
  for(int i=0;i<columns;i++){
   for(int j=0;j<rows;j++){
 
    if(universe[i][j]==1){
      cells[i][j]._life=true;
    }//endof if
    else{
       cells[i][j]._life=false;
    }
 
    cells[i][j].display();
   }
  }
 
   resetNeighbors();
 
}//endof draw
 
class Cell{
 
  float  _xpos=0;
  float  _ypos=0;
  float  _cellsize=0;
  int    _alivefill;
  int    _deadfill;
  boolean _life;
  int _neighbors;
 
  Cell(float xpos, float ypos, float cellsize){
    _neighbors=0;
    _cellsize=cellsize;
    _xpos=xpos;
    _ypos=ypos;
    _deadfill=40;
    _alivefill=180;
    _life=true;
 
  }//endof constructor
 
  void display(){
   noStroke();
   if(_life)  fill(_alivefill);
   else fill(_deadfill);
   rect(_xpos+padding,_ypos+padding,_cellsize,_cellsize);
  }
 
}//endof class
 

Posted in Cellular Automata, Processing, Programming, sketches.


American Gothic – Dexter Season 6 Episode 7

Grant Wood - American Gothic


tractor engine over Dexter's shoulder

In Dexter's newest episode, they re-enacted the American Gothic painting by Grant Wood and it's pretty hard to miss -there's a scene where Rudy/Brian stands next to Dexter while Dexter is holding a pitchfork in front of the painting of the house from American Gothic.

Wikipedia reads about the original painting:
" the man's pitchfork symbolizing hard labor, and the flowers over the woman's right shoulder suggesting domesticity."
In the frame above, we see a tractor's engine over Dexter's shoulder.

There's also the sign in the painting that reads 124.50, which bring to mind the messages from Doomsday Killer, which went on like 1237, 1242... maybe I'm just reading into it but it would be great if they embedded plot clues into the environment's design.

For the sake of not giving any spoilers, I shall not go further ;)

Posted in awesome.

Tagged with , , , .