Please help me with building a paper tape reader (punched tape)

Scanning it might be a little tedious, but possible:

  1. Lay the strip on the scanner, along the "long edge", and scan.
  2. Note the "bottom" holes of the tape; advance the tape so that bottom row of holes is the first "top" row for the new scan (note, you may want to use two rows).
  3. Scan again.
  4. Keep doing this until you run out of tape.

You'll end up with a set of files that you'll then want to crop and stitch together - using the "duplicate" holes as reference markers to align things up. You may want to scan in color, and put bits of colored cellophane to mark these holes and such (then later crop/edit out the color in the final image).

If you have a way to count/number the rows of holes (there's going to be a fixed number per inch or something like that), you can know where each set of holes are for the scan; basically you want to have duplicate holes for the alignment needs when you stitch them together in the editing software - but you want to avoid leaving duplicate rows, for obvious reasons.

Once you have the final scan (as a very tall, or very wide "image"), reduce it to black and white, then use that with Processing or some other programming language to "scan the holes" and produce an ASCII text file (maybe as a long string of 1's and 0's?). You might want to do some error checking too with the scan and ASCII file (to verify both are the same) - some kind of parity check or CRC would suffice. Something else to keep in mind (before scanning - or after the scan is complete) is the bit order (ie - which side is bit 0 vs bit 8); so you may want to make two ASCII files, or something similar (also - which end of the tape is the "start?" - that could be important if it is unknown).

Once you have it in some ASCII form (even if the order isn't completely correct), then you can more easily attack it...