Nintendo DS Touchscreen + Arduino problem

I just bought one of the Nintendo DS touchscreens (http://www.sparkfun.com/commerce/product_info.php?products_id=8977) off of sparkfun and the break out board for it as well... but I can't seem to get it to work. I've seen many of the tutorials on here and on another site... I'm mostly looking at this tutorial (http://tmtgr.blogspot.com/2010/06/using-nintendo-ds-touchscreen-with.html), but still I can't get anything to show up on the serial port. First, here are my issues. I bought the break out board thinking that since Sparkfun said they were compatible that they would work... they do not. Turns out the break out board is looking for a 4 wire connection that is 0.3mm thick... but the actual Nintendo DS strip is only 0.1mm thick, so it when I first put it in the slot, it would continually just fall out. So, I added two layers of fine tape to the back side (non copper side) to thicken the strip a little bit and it seems to connect better... but I'm not sure if this was the wrong thing to do or not. Other people on here have actually just cut the strip and soldered wires directly to them, but I don't think I have any hook up wire small enough for this connection (it's incredibly small). Then the code I'm using is pretty much straight from that tutorial. All I'm trying to do is to print the X and Y positions to the serial port. Here's an image of my hardware setup touchscreen_error | andyopayne | Flickr. Does anyone know what I'm doing wrong? I don't get anything showing up when I open the serial monitor. The code I'm using is below. Any comments would be greatly appreciated.
Thanks again,
Andy

//Code originally written by TmTgr http://tmtgr.blogspot.com/2010/06/using-nintendo-ds-touchscreen-with.html
// Digital connections (used to drive power)
#define Lo 2 // LEFT to digital output 2
#define Bo 3 // BOTTOM to digital output 3
#define Ro 4 // RIGHT to digital output 4
#define To 5 // TOP to Digital output 5

// Analog connections (used to read the touch position)
#define Ti 3 // TOP also to analog input 3
#define Ri 4 // RIGHT also to analog input 4



// vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
// set initial touched position
int touchX = 0;
int touchY = 0;
boolean wasTouched = false;
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


void setup()
{
  Serial.begin(9600);
}

void loop()
{    
  //Serial.println("on");
  if (touched())  //if the screen is touched then...
  {
    //if (!wasTouched)
    //{
      //Serial.println("on");
    //}
    Serial.print(touchX);
    Serial.print(" ");
    Serial.println(touchY);
    wasTouched = true;
  }
  else
  {
    wasTouched = false;
  }
}

// return TRUE if touched, and set coordinates to touchX and touchY
boolean touched()
{
  boolean touch = false;

  // Horizontal routine - set L to gnd and R to Vcc
  // set L = ground
  pinMode(Lo, OUTPUT);
  digitalWrite(Lo, LOW);
  // set R = Vcc
  pinMode(Ro, OUTPUT);
  digitalWrite(Ro, HIGH);
  // T e B high impedance (input mode)
  pinMode(To, INPUT);
  pinMode(Bo, INPUT);
  // wait a bit, then read from Top
  delay(5);
  touchX = analogRead(Ti);

  // Vertical routine - set B to gnd and T to Vcc
  // Set B = gnd
  pinMode(Bo, OUTPUT);
  digitalWrite(Bo, LOW);
  // set T = Vcc
  pinMode(To, OUTPUT);
  digitalWrite(To, HIGH);
  // R e L high impedance (input mode)
  pinMode(Ro, INPUT);
  pinMode(Lo, INPUT);
  // wait a bit, then read from Right
  delay(5);
  touchY = analogRead(Ri);

  // Only read touch if coords are below 1000 and above 0 (stops errors with certain screens)
  if(touchX < 1000 and touchX > 0 and touchY < 1000 and touchY > 0)
    touch = true;

    return touch;

}

//Code originally written by TmTgr http://tmtgr.blogspot.com/2010/06/using-nintendo-ds-touchscreen-with.html
// Digital connections (used to drive power)

I have to correct you there.

Code originally writtern by Marco Nicolato, modified by Mowcius and posted up on the arduino forum, used by TmTgr.

The code is essentially fine (I know cos it's almost exactly how I wrote it) so that is not the problem. I presume from that, that your wiring must be the issue.

Mowcius

My mistake Mowcius. Thank you for the correction. I went back and resoldered the break out board (because Richard rightly stated that I had soldered it backwards). So, I soldered a new header on it just as it shows on the image on TmTgr's page. I also double checked all my wires. I have y1 going to Dpin5 and Apin3, x2 going to Dpin4 and Apin4, y2 going to Dpin3, and x1 going to Dpin2... and yet I still doing get anything coming over the port. My setup looks exactly like the images on TmTgr's page. I'm not sure where I'm going wrong. The only thing I can think of is that either I have a faulty touchscreen, or somehow I'm not actually getting a good connection with the breakout board. I wish I had known ahead of time that the slot takes a 0.3mm strip and not the 0.1mm that comes on this touchscreen. Is my tape 'bandaid' causing any problems? I guess I could really try to cut it up and try to resolder wires directly to it... but I only want to do that as a last resort. Any other ideas?

Oh yeah... I forgot to mention that I did uncomment out the line at the top of the loop that prints the "on" statement just to see if I was getting something coming over the serial port...and that all works fine. I'm just not getting any of the Xpos and Ypos variables coming over.

Take a look at the original page and try that code and those pin connections:

http://mnicolato.altervista.org/arduino/ardtouch.htm

If that doesn't work then there is definitely a bad connection somewhere.

Mowcius

You know... I actually removed the code at the bottom which limits printing the touch values unless the values are between 0 and 1000 (per Richard's suggestion) and I now do actually get some numbers being printed to the port. The problem is that they are always somewhere above 1000 (the Xpos is always around 1013 and the Ypos is 1023). No matter where I touch on the board those are the same numbers being sent to the port. Any ideas?
Thanks for all the help.

That's why that code is there, to limit it so that you don't get the numbers like that.

It sounds like you might be using your touch screen upside down (only one side is touch capable) or a wire is not connected properly.

Mowcius

Well, I decided to try to not use the breakout board and to just try to solder some wires to the connection strip... but I messed it all up so now that one is worthless. I'm going to have to try to order another one and try again. Has anyone figured out a better solution than tape or soldering wires to those little connections on these Sparkfun touchscreens?

I would email SparkFun and tell them about the problem. They may send you a replacement if you got a defective product. The connector is recommended for those kinds of ribbon cables. For exactly the reason you discovered empirically.

Also what I would suggest.

Presumably you purchased both from sparkfun so they should gell together...

Mowcius

but I messed it all up so now that one is worthless

Probably not worthless to a person with more electronics experience.

Keep it and then in a year or so you'll dig it out of a box and think 'I can use this'.

I have always kept broken stuff with no idea how or what to use it for but then now I am finding that I have the knowledge and experience to start using some of this stuff.

Mowcius